Casey schrieb:
> So I am trying to replicate my own version of mspaint with fltk. I
> have two problems, my first problem is that I am limited to a certain
> number of points. My current method is using a predetermined amount
> of points(line 46: point points[1000]; ) Is there a better method
> that just adjusts the amount of points according to the user's input
> instead of limiting the number of points to 1000??? This presents
> another issue where the color is changing every point, instead of the
> current point the user is working on.

> int color_num = FL_BLACK;
>
> struct point { point(){ x = 0 ; y = 0; } int x; int y; };

Your point is missing any colour, isn't it?

Maybe you could get rid of both problems, by using an Fl_Image for 
drawing area. You can define the size of the image (so there is no 
special limit of points) and you can define number of colours by the 
depth of the image. Now you can change pixel of the image and copy it to 
screen, also you can save and load images. This is half way to paint 
functionality! ;o)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to