[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ExtCtrls' (#lcl)

TCustomShape.Shape

Indicates the geometric shape drawn on the shaped control.

Declaration

Source position: extctrls.pp line 301

public property TCustomShape.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

TCustomShape.DrawToCanvas

  

Draws the Shape for the control on the specified canvas.

TCustomShape.OnShapePoints

  

Event handler signalled to get a custom vertices for the shape drawn on the control.

TCustomShape.Brush

  

The Brush used to fill the shaped control.

TCustomShape.Pen

  

The Pen used to draw lines on the shaped control.

TShapeType

  

TShapeType is an enumerated type with values representing standard geometric shapes.

TCanvas

  

Implements a drawing surface for a visual control or bitmap image.


Version 4.0 Generated 2025-05-03 Home