public Path AddRoundedRectangle(
float x,
float y,
float width,
float height,
float cornerRadius
)
Public Function AddRoundedRectangle (
x As Single,
y As Single,
width As Single,
height As Single,
cornerRadius As Single
) As Path
public:
Path^ AddRoundedRectangle(
float x,
float y,
float width,
float height,
float cornerRadius
)
member AddRoundedRectangle :
x : float32 *
y : float32 *
width : float32 *
height : float32 *
cornerRadius : float32 -> Path
The rounded rectangle is added as a new closed figure.
If cornerRadius is negative, the absolute value will be used. If it is greater than the half of the smaller side of the bounding rectangle, it will be adjusted to the half of the smaller side, so the result will be an oval shape. If the cornerRadius is 0, a simple rectangle will be added.
The coordinates of the specified bounding rectangle are not validated here but in the moment of drawing the coordinates of the possibly transformed path points must fall into the bounds of an int value; otherwise, an OverflowException will be thrown.