Method DrawRoundRectangleLTRB
DrawRoundRectangleLTRB(Graphics, Pen, float, float, float, float, float, float)
Draws a rounded rectangle on the specified graphics surface using the given dimensions and corner radii.
public static void DrawRoundRectangleLTRB(Graphics dc, Pen pen, float left, float top, float right, float bottom, float cornerWidth, float cornerHeight)
Parameters
dcGraphicsThe Graphics object on which the rounded rectangle will be drawn. Cannot be null.
penPenThe Pen used to outline the rounded rectangle. Cannot be null.
leftfloatThe x-coordinate of the left edge of the rectangle.
topfloatThe y-coordinate of the top edge of the rectangle.
rightfloatThe x-coordinate of the right edge of the rectangle.
bottomfloatThe y-coordinate of the bottom edge of the rectangle.
cornerWidthfloatThe width of the ellipse used to define the horizontal curvature of the corners. Must be non-negative.
cornerHeightfloatThe height of the ellipse used to define the vertical curvature of the corners. Must be non-negative.
Remarks
The method calculates the corner radius as half the smaller of
cornerWidth and cornerHeight.
The rectangle is defined by the coordinates
specified by left, top, right,
and bottom.