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

TCustomImage.Paint

Draws the image to the control canvas.

Declaration

Source position: extctrls.pp line 570

protected procedure TCustomImage.Paint; override;

Description

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.

Remark: No additional actions are performed in the method when a TGraphic instance has not been assigned to the Graphic property in Picture.

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.

Paint signals the OnPaintBackground event handler (when assigned) using the canvas and drawing rectangle to render the background for the image. The StretchDraw method in the Canvas is used to render the image content.

Paint calls the inherited method to ensure that the OnPaint event handler is signalled (when assigned).

See also

TCustomImage.Canvas

  

Canvas used to draw the image.

TCustomImage.DestRect

  

Gets the rectangle where the image is painted.

TCustomImage.AntialiasingMode

  

Indicates if anti-aliasing is used when rendering the image.

TCustomImage.Transparent

  

Indicates if the image has a clear, non-opaque background.

TCustomImage.Stretch

  

Indicates if the image is resized to the client area for the control.

TCustomImage.OnPaintBackground

  

Event handler signalled to draw the background for the image.

TCanvas

  

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

TCanvas.StretchDraw

  

Expands or contracts the specific graphic content to fit the specified destination rectangle on the canvas.

TGraphicControl.Paint

  

Implements the default handler used to draw the control.

TGraphicControl.OnPaint

  

Event handler signalled to paint the control.


Version 4.0 Generated 2025-05-03 Home