Draws the image to the control canvas.
Source position: extctrls.pp line 570
protected procedure TCustomImage.Paint; override; |
Paint is an overridden procedure used to draw the image to the control Canvas. At design-time, a dashed black line is drawn around the image as a frame to mark the dimensions for its content.
Paint uses the Canvas from the ancestor class as the target for the drawing operation. The value in AntialiasingMode is assigned to the corresponding property in the Canvas. The rectangle returned from DestRect is used as the drawing area.
| Remark: | No actions are performed in the method when a TGraphic instance has not been assigned to the Graphic property in Picture, or the ancestor class does not have an assigned Canvas. |
Paint signals the OnPaintBackground event handler (when assigned) using the canvas and drawing rectangle to render the background for the image.
If the image is loaded using Images and ImageIndex, the canvas scaling factor is applied (when needed) to the width and height for the bitmap image. The StretchDraw method in the Canvas is used to render the image content to the display rectangle on the canvas.
Paint calls the inherited Paint method to ensure that the OnPaint event handler is signalled (when assigned).
Modified in LCL version 4.4 to perform image scaling (when needed) using the canvas scaling factor for the widgetset.
|
Canvas used to draw the image. |
|
|
Gets the rectangle where the image is painted. |
|
|
Indicates if anti-aliasing is used when rendering the image. |
|
|
Indicates if the image has a clear, non-opaque background. |
|
|
Indicates if the image is resized to the client area for the control. |
|
|
Event handler signalled to draw the background for the image. |
|
|
Implements a drawing surface for a visual control or bitmap image. |
|
|
Expands or contracts the specific graphic content to fit the specified destination rectangle on the canvas. |
|
|
Implements the default handler used to draw the control. |
|
|
Event handler signalled to paint the control. |
| Version 4.4 | Generated 2025-11-08 | Home |