TCustomShape.Shape property
Indicates the geometric shape drawn on the shaped control.
Declaration
property Shape: TShapeType read FShape write SetShape default stRectangle;Description
Shape is a
TShapeType property that specifies the
geometric shape drawn on the control. Shape is used in the DrawToCanvas method.
It and determines the number of vertices needed for the shape, and their
locations on the control. It also determines the drawing operations performed
to draw the Shape on the control Canvas. For example:
- stRectangle, stSquare
- Calls the Rectangle method for the canvas.
- stRoundRect, stRoundSquare
- Calls the RoundRect method for the canvas.
- stCircle, stEllipse
- Calls the Ellipse method for the canvas.
- stSquaredDiamond, stDiamond
- Allocates TPoint instances with the four (4) vertices needed for the shape and calls the Polygon method for the canvas.
- stTriangle, stTriangleDown, stTriangleLeft, stTriangleRight
- Allocates TPoint instances with the three (3) vertices needed for the shape and calls the Polygon method for the canvas.
- stStar, stStarDown
- Calculates the center point and radii needed to scale the width or height for the shape. Allocates the elevent (11) vertices needed for the shape and calls the Polyon method for the canvas.
- stPolygon
- Signals the OnShapePoints event handler (when assigned) to get the vertices and polygon winding for a user-specified or irregular polygonal shape. Line segments are drawn betwwen the vertices to render the shape for the control.
Use Brush and Pen to control the color and drawing style for the background and lines on the shaped control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
