How to draw a border around text but with round corners?

E

Eitan

Hello,
I would like to draw a border around some text I am drawing on the screen (I
am using g.DrawString(…) function). I would like the edges of the boarder to
be rounded rather than square (90 degrees).

Any idea how can I achieve that?

Thanks
EitanB
 
N

Nicholas Paldino [.NET/C# MVP]

EitanB,

You can look into creating a custom Pen object to perform the drawing,
and then set the EndCap property to LineCap.Round. You might even be able
to set it to Custom and use a class that extends from CustomLineCap.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top