[Overview][Types][Classes][Procedures and functions][Index] |
Draws the Shape for the control on the specified canvas.
Source position: extctrls.pp line 291
protected procedure TCustomShape.DrawToCanvas( |
ACanvas: TCanvas |
); virtual; |
DrawToCanvas is a method used to draw the shaped control on the TCanvas instance specified in the ACanvas argument. It calculates the drawing area (TRect) needed using the control Width and Height, the width of the Pen on the canvas, and the Shape for the control.
The Brush style and color for the canvas are set in the calling routine. This allows the same method to be used to draw either the content for the shaped control or its Monochrome mask - depending on the settings in the canvas.
DrawToCanvas calls methods in ACanvas to perform drawing operations needed for the value in Shape. For example:
DrawToCanvas is called from the UpdateMask and Paint methods.
Added in LCL version 4.0.
|
Indicates the geometric shape drawn on the shaped control. |
|
|
The Pen used to draw lines on the shaped control. |
|
|
Event handler signalled to get a custom vertices for the shape drawn on the control. |
|
|
Updates the internal Monochrome bitmap used as a mask to detect mouse click events on the shaped control. |
|
|
Draws the shape for the control on its Canvas. |
|
|
Implements a drawing surface for a visual control or bitmap image. |
|
|
The horizontal size for the control. |
|
|
The vertical size for the control. |
|
Version 4.0 | Generated 2025-05-03 | Home |