G
Guest
hi, i created a paint program for my c++ class using a global GraphicsPath
variable. i the, in the onpaint method, draw the line the users draws with
the mouse. simple. the only problem is that when i invalidate the panel im
drawing on in order to see the line, it flickers, even with double buffering.
if i only invalidate a rectangle around teh mouse, if the user mouse the
mouse too fast the line wont be drawn in certain intervals because the paint
event cant fire enough times. how can i either eliminate the flickering or
invalidate a part of the panle enough that it will show the entire line at
draw time. (if i bring anything in front of the panel or minimize the
program, the windows repaint method shows the graphics)
i also tried using a Graphics variable to draw on a surface on a mousedown
event, but then if you minimized the program or brought anything in front of
the graphics, youd lose what you drew. how can i sto this from happeneing?
which ever question is easier to answer, if any, would be helpful. ive been
researching this for weeks but i cant seem to find an answer, thanks
variable. i the, in the onpaint method, draw the line the users draws with
the mouse. simple. the only problem is that when i invalidate the panel im
drawing on in order to see the line, it flickers, even with double buffering.
if i only invalidate a rectangle around teh mouse, if the user mouse the
mouse too fast the line wont be drawn in certain intervals because the paint
event cant fire enough times. how can i either eliminate the flickering or
invalidate a part of the panle enough that it will show the entire line at
draw time. (if i bring anything in front of the panel or minimize the
program, the windows repaint method shows the graphics)
i also tried using a Graphics variable to draw on a surface on a mousedown
event, but then if you minimized the program or brought anything in front of
the graphics, youd lose what you drew. how can i sto this from happeneing?
which ever question is easier to answer, if any, would be helpful. ive been
researching this for weeks but i cant seem to find an answer, thanks