I am using .NET C#, WinForms, and GDI+, to create my own Custom Control.
In some part of it, I want to draw a small rectangle, with some number in it.
Currently I do it like this: Graphics.FillRectangle(); followed by Graphics.DrawString();
I would like to do a tiny improvement, inwhich the rectangle will have Rounded corners instead of sharp corners.
Since we're talking about small rectangles(the height is usually 11 pixels or so), then the rounding can even be done via removing the corner pixel from each of the 4 corners..
What is the simplest way to do it?
Currently I have in mind to create a Region object, and then to draw it.
Is there another option in addition to using a region?
Thank you
Aucun commentaire:
Enregistrer un commentaire