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

TCustomShape.OnShapePoints

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

Declaration

Source position: extctrls.pp line 303

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

Version info

Added in LCL version 4.0.

See also

TCustomShape.Shape

  

Indicates the geometric shape drawn on the shaped control.

TCustomShape.DrawToCanvas

  

Draws the Shape for the control on the specified canvas.

TShapePointsEvent

  

Specifies an event handler used to get an array of user-specified vertices for a polygonal shape in TShape,

TShapeType

  

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

TPointArray


Version 4.0 Generated 2025-05-03 Home