2
Answers

painting with GDI+

crispybc

crispybc

19y
2.4k
1
hi, im writing a paint program using vb.net. My problem is, im trying to get it to draw with a brush continuosly to the screen while the mousebutton is down. I am currently using the on mousemove handler If (e.Button = MouseButtons.Left) Then g.FillEllipse(br, e.X - (size \ 2), e.Y - (size \ 2), size, size) End If The problem with this is if i move the mouse too fast it just creates a few scattered ovals along the path the mouse travelled instead of a continuous brush stroke. Does anyone have a better method to resolve this? Also when using this method if the brush's color has a lower alpha value the ovals overlap rather fast creating a blotchy color. I need it to draw without paint over previously drawn areas so it is 1 continous color. I have an idea about creating a temp graphics object and then using alpha blending, then overlaying that onto original surface which im going to try next. But if anyone has other/better ideas please chime in. Thanks

Answers (2)