Interactive paint program in fluid, fltk and opengl.
Hi!
I am currently working on simple paint like program using fluid, fltk and opengl. The purpose of the program is to let the user draw some basic 2d geometric figures like points, lines, rectangle, circles and polygons on a image. I have done the first four with the exception of polygon. The way polygon should work is as follow:
Each click of left mouse button defines a vertex of the polygon and a double click of the left mouse button defines the last vertex of that polygon.
Now my question is, what’s the best strategy of implementing this? I have come up with one way. I am thinking of storing the coordinates of each click. So at each click i store the new coordinates and go through my array and redisplay the old lines of the polygon. I don’t know if it's the most efficient way but i like to know if this is achievable in an easier way than i described.
--------------------------------------------------------------------------------------------------------------------------
F22 Lightning 3 Screen Saver:
F22L3ScreenSaver.exe
[edited by - strikernr on January 25, 2004 4:50:31 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement