How to make a round Pen or Brush


I'm writing a Paint Program and I have this problem with the freehand drawing routine. When the drawSize (the width of the drawn line) is 1 it works great, but when the drawSize gets bigger it looks terrible. The Pen shape is a thin line as long as the drawSize value and it automatically rotates in the direction you move the mouse, the net result is a crappy looking line.

This is the code I use to draw the line.
[code]GR.DrawLine(usingPen, x1, y1, x2, y2)[/code]
Remember, this does not just draw a straight line from point A to point B, but it is continuosly drawing lines as the User moves the mouse.

Is there a way to define a Pen shape as a round ball instead of a line?
Or maybe I need to use a round Brush somehow? I just don't know.

Thank you


  • seancampbellseancampbell Pennsylvania, USA
    Gr.DrawEllipse. Specify the bounds of the rectangle and it will draw a circle inside (oval if you don't set the bounds of your rectangle to be a square).

    Hope that helps
  • Did you ever figure out how to create a round Brush?

    I was using an algorithm to enumerate the points alone a line and plotting many ellipses to simulate the effect of having a round brush, but this is quite inefficient and would like to have another way of doing it.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!