Sign in Join
FPDoc Onlineexperiment

TCustomShape.OnShapePoints property

Member of TCustomShapepublicIn unit ExtCtrls

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

Declaration

pascal
property OnShapePoints: TShapePointsEvent read FOnShapePoints write SetOnShapePoints;

Description

OnShapePoints is a TShapePointsEvent property with the event handler signalled to get user-specified vertices for a polygonal Shape on the control. It allows a custom shape to be defined for the control, or an irregular variant of one of the predefined values in TShapeType. For example: a parallelogram, an isocoles triangle, or an octagon.

An application can implement and assign a handler routine using the signature in TShapePointsEvent to respond to the event notification. The handler can populate its array with the number of TPoint instances needed for the vertices on the polygon. It can also indicate whether Winding order was used for the returned vertices.

Changing the routine assigned to the handler causes the control to be redrawn.

OnShapePoints is signalled (when assigned) from the DrawToCanvas method when the Shape property is set to stPolygon.

Added in LCL version 4.0.

See also

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