Table of Contents

Method DrawRoundRectangleLTRB

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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

dc Graphics

The Graphics object on which the rounded rectangle will be drawn. Cannot be null.

pen Pen

The Pen used to outline the rounded rectangle. Cannot be null.

left float

The x-coordinate of the left edge of the rectangle.

top float

The y-coordinate of the top edge of the rectangle.

right float

The x-coordinate of the right edge of the rectangle.

bottom float

The y-coordinate of the bottom edge of the rectangle.

cornerWidth float

The width of the ellipse used to define the horizontal curvature of the corners. Must be non-negative.

cornerHeight float

The 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.