void DrawRoundRect( Rect rect, Margin margins )

book_4_sparkGenerated
code_blocksInput

Description

The DrawRoundRect method is used to draw a rounded rectangle on a Bitmap object. This method allows you to specify the rectangle's dimensions and the margins for the rounded corners.

Usage

To use the DrawRoundRect method, you need to have an instance of the Bitmap class. You can then call this method by passing a Rect object that defines the position and size of the rectangle, and a Margin object that specifies the margins for the rounded corners.

Example

// Create a new Bitmap instance
Bitmap bitmap = new Bitmap();

// Define the rectangle dimensions
Rect rect = new Rect(10, 10, 100, 50);

// Define the margins for the rounded corners
UI.Margin margins = new UI.Margin(5);

// Draw a rounded rectangle on the bitmap
bitmap.DrawRoundRect(rect, margins);