Table of Contents

TTMSFNCGraphics.DrawRoundRectangle Method

Draws a rounded rectangle defined by double coordinates with the given corner radius and optional corner selection.

API unit family: TMSFNCGraphics Declaring type: TTMSFNCGraphics

Overloads

Overload 1

Draws a rounded rectangle defined by double coordinates with the given corner radius and optional corner selection.

procedure DrawRoundRectangle(ALeft, ATop, ARight, ABottom: Double; ARounding: Single = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;

Parameters

Name Description
ALeft Left edge of the bounding rectangle in floating-point pixels.
ATop Top edge of the bounding rectangle in floating-point pixels.
ARight Right edge of the bounding rectangle in floating-point pixels.
ABottom Bottom edge of the bounding rectangle in floating-point pixels.
ARounding Corner radius in pixels. Default is 10.
ACorners Set of corners to round; unselected corners remain square. Default is all four corners.
AModifyRectMode Pixel adjustment applied to the rectangle edges to align with the physical pixel grid.

Overload 2

Draws a rounded rectangle from a TRectF with the given corner radius and optional corner selection.

procedure DrawRoundRectangle(ARect: TRectF; ARounding: Single = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;

Parameters

Name Description
ARect Bounding rectangle for the rounded rectangle.
ARounding Corner radius in pixels. Default is 10.
ACorners Set of corners to round; unselected corners remain square. Default is all four corners.
AModifyRectMode Pixel adjustment applied to the rectangle edges to align with the physical pixel grid.

Overload 3

Draws a rounded rectangle defined by integer coordinates with the given corner radius and optional corner selection.

procedure DrawRoundRectangle(ALeft, ATop, ARight, ABottom: Integer; ARounding: Integer = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;

Parameters

Name Description
ALeft Left edge of the bounding rectangle in integer pixels.
ATop Top edge of the bounding rectangle in integer pixels.
ARight Right edge of the bounding rectangle in integer pixels.
ABottom Bottom edge of the bounding rectangle in integer pixels.
ARounding Corner radius in whole pixels. Default is 10.
ACorners Set of corners to round; unselected corners remain square. Default is all four corners.
AModifyRectMode Pixel adjustment applied to the rectangle edges to align with the physical pixel grid.

Overload 4

Draws a rounded rectangle from a TRect with the given corner radius and optional corner selection.

procedure DrawRoundRectangle(ARect: TRect; ARounding: Integer = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;

Parameters

Name Description
ARect Bounding rectangle for the rounded rectangle.
ARounding Corner radius in whole pixels. Default is 10.
ACorners Set of corners to round; unselected corners remain square. Default is all four corners.
AModifyRectMode Pixel adjustment applied to the rectangle edges to align with the physical pixel grid.