TCanvas.FrameRect procedure
Draws a border around the specified rectangle with the Brush for the canvas.
Declaration
procedure FrameRect(const ARect: TRect); virtual
procedure FrameRect(X1: Integer; Y1: Integer; X2: Integer; Y2: Integer)Description
FrameRect is an overloaded method used to draw a frame or border
for the specified rectangular area using the Brush for the canvas. Note that
this is different from the
Frame method which uses the Pen for drawing.
Overloaded variants allow the bounds for the rectangle to be defined using:
Four separate Integer values representing the Top/Left and Bottom/Right coordinates for the rectangle.
A TRect instance where the vertices are represented as either four Integers, two TPoint instances for TopLeft and BottomRight, or a vector using the TArray4IntegerType.
FrameRect draws the border for the shape using the style, color, or bitmap defined in Brush. The drawing operation is always performed using a 1 pixel width / height.
FrameRect calls the routine in the LCL interface which implements the method for the widgetset. The return value from the LCL interface is ignored.
Use Frame to draw borders on a rectangle using the Pen for the canvas. Use Frame3D to draw borders using a specified bevel style or colors which simulate 3-dimensional relief.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
