Greetings to all.
I've been working on a simple paint application (ala MS Paint) that can draw lines, rectangle, ellipses etc but I have a problem in that none of it is drawn on the canvas in real-time (i.e. If the user was dragging out a rectangle, they would only see the shape drawn on the canvas when they released the mouse button, and not as they were dragging).
I want the user to be able see the lines/curves/shapes etc they are drawing in real-time, i don't want the application to just draw when the user releases the mouse button. What would be the best way to go about this, bearing in mind that i already have all the drawing code done. Most of it is called on a mouse up command, could i just call the drawing methods on a mouse down command instead (i.e. while the user is holding down the mouse button and dragging)??
Thanks,
- perps.
I've been working on a simple paint application (ala MS Paint) that can draw lines, rectangle, ellipses etc but I have a problem in that none of it is drawn on the canvas in real-time (i.e. If the user was dragging out a rectangle, they would only see the shape drawn on the canvas when they released the mouse button, and not as they were dragging).
I want the user to be able see the lines/curves/shapes etc they are drawing in real-time, i don't want the application to just draw when the user releases the mouse button. What would be the best way to go about this, bearing in mind that i already have all the drawing code done. Most of it is called on a mouse up command, could i just call the drawing methods on a mouse down command instead (i.e. while the user is holding down the mouse button and dragging)??
Thanks,
- perps.