ekosha
11-22-2007, 11:27 AM
Hay All,
I am implementing an application where a user is able to select colors and color some objects, The application is a 2D only. I am trying to implement something similar to a cursor that follows the mouse basically a circle (group of pixels) that is colored with the currently selected coloring color.
I am using a glutPassiveMotionFunc that basically knows the new x and y and draws the circle respectively, but I should clear the old point, intutively is tried to set its color to the background color but this makes it act as an eraser ...
I have come to an idea that i can have a 3d ortho an draw this "mouse follower" on a differnt Z value and then be able to set the previous point to a transparent color, That did not work, the color is yet white and so erases what is beneath it ... Now I think there can be a way if i can remove the the point by translating this plane (plane at the Z where the follower is drawn) ...
Any suggestion how I can get this to work ... could there be a more direct way ?????
Thanks a lot for reading through :)
I am implementing an application where a user is able to select colors and color some objects, The application is a 2D only. I am trying to implement something similar to a cursor that follows the mouse basically a circle (group of pixels) that is colored with the currently selected coloring color.
I am using a glutPassiveMotionFunc that basically knows the new x and y and draws the circle respectively, but I should clear the old point, intutively is tried to set its color to the background color but this makes it act as an eraser ...
I have come to an idea that i can have a 3d ortho an draw this "mouse follower" on a differnt Z value and then be able to set the previous point to a transparent color, That did not work, the color is yet white and so erases what is beneath it ... Now I think there can be a way if i can remove the the point by translating this plane (plane at the Z where the follower is drawn) ...
Any suggestion how I can get this to work ... could there be a more direct way ?????
Thanks a lot for reading through :)