RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ExtCtrls.Frame3D Function

Draws a three dimensional frame on a canvas.

Pascal
procedure Frame3D(Canvas: TCanvas; var Rect: TRect; TopColor: TColor; BottomColor: TColor; Width: Integer);
C++
Frame3D(TCanvas Canvas, TRect Rect, TColor TopColor, TColor BottomColor, int Width);

Use Frame3D to create three-dimensional effects when drawing directly on a canvas.  

The Canvas parameter is the canvas to draw on. 

The Rect parameter specifies the position on the canvas where the three-dimensional rectangle should appear. It returns the dimensions of the rectangle that lies inside the frame. 

The TopColor and BottomColor parameters indicate the colors that appear on the left and top or the right and bottom of the rectangle respectively.  

The Width parameter specifies the width of the frame. 

To create a raised effect, the TopColor should be a light color and the BottomColor should be a shadow color. To create a depressed effect, the TopColor should be the shadow color and the BottomColor should be the light color. To create a beveled effect, draw a frame immediately inside another frame with the colors reversed. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!