Sign in Join
FPDoc Onlineexperiment

TCanvas.Frame3D procedure

Member of TCanvaspublicIn unit Graphics

Draws a frame for the specified rectangle with a 3-dimensional appearance.

Declaration

pascal
procedure Frame3d(var ARect: TRect; const FrameWidth: Integer; 
 const Style: TGraphicsBevelCut); virtual
procedure Frame3D(var ARect: TRect; TopColor: TColor; 
 BottomColor: TColor; const FrameWidth: Integer)
 ; overload

Arguments

ARect

Bounds for the rectangle on entry, the inner rectangle without the frame area on exit.

FrameWidth

Thickness for the borders drawn in the method.

Style

Bevel style used to draw the borders on the rectangle.

TopColor

Color used for the top and left edges of the frame.

BottomColor

Color used for the bottom and right edges of the frame.

Description

Frame3D is an overloaded method used to draw a frame for the specified rectangle with a 3-dimensional appearance. It draws the frame using the Pen for the canvas with the style, colors, and size passed in the parameter values. Frame3D does not fill the inner area for the rectangle; it draws the frame or borders only.

ARect is the TRect instance with the bounds where the drawing operation is performed. It is a variable parameter updated in the method to return the inner area for the rectangle without the frame area.

The overloaded variants allow the drawing style and size for the 3-dimensional frame to be specified.

Style contains a value from the TGraphicsBevelCut enumeration and is used when a beveled frame is desired.

TColor values can be provided to use colors to simulate 3-Dimensional relief. TopColor is the color used to draw the top and left edges on the frame. BottomColor is used to draw the bottom and right edges on the frame. System colors like cl3DLight, cl3DHilight, cl3DDkShadow, cl3DShadow, and cl3DFace are commonly used in these parameters.

FrameWidth contains the line thickness for the 3-D frame; for left and right edges it is the border width, for top and bottom edges it is the border height. The bounds in ARect are inflated by this value before exit.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.