How to lift pen when drawing a path

kpgraci

Active member
Joined
Feb 21, 2011
Messages
30
Location
New Orleans
Programming Experience
10+
I'm doing this:

gp = New GraphicsPath
gp.AddArc(New Rectangle(0, 15, 100, 100), 180, 90)
gp.AddArc(New Rectangle(50, 15, 150, 100), 180, 90)
outlineColor = Color.Gray
g.DrawPath(New Pen(outlineColor, 1), gp)
gp.Dispose()

But the two arcs are connected with a line. My goal is to draw then fill an enclosed polygon composed of arcs and lines.

Is there a way to 'lift' the pen between unconnected portions of the path, or do I have to trace out the path in order so that all sub-paths drawn are connected as they should be? (hope that makes sense)

thx
 
I've never used a GraphicsPath object in my life but I just spent a couple of minutes reading the documentation and I now know that what you want is achieved with multiple figures. Always, ALWAYS read the relevant documentation first. It would have taken you just a couple of minutes to find the answer too.
 
gee, dude...I thought it would be a simple question for someone that HAD used gdi before.

Obviously I could find the answer myself...that applies to absolutely anything I could ever want to ask...so why have a community forum?

Anyway...I'm not discouraged. I ask all kinds of questions on a variety of forums, some are basic questions, others are complex, and I also answer some questions when I can.

If I find a question I think is stupid or if I believe OP is just asking for someone to do their work for them I just pass it by...ha...that's even easier than taking the effort to excoriate someone.

BTW...your answer isn't all that helpful anyway...multiple figures? So I guess I won't be posting here any more. geez.
 
Back
Top