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

  • Thread starter Thread starter Eitan
  • Start date Start date
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
 
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.
 
Back
Top