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

# TArrow.Paint

Implements the paint handler used to draw the control.

## Declaration

Source position: arrow.pp line 50

`protected procedure TArrow.Paint; override;`

## Description

Paint is an overridden method in TArrow. It extends the inherited to method to perform actions needed to draw the shape and an optional shadow.

Paint calculates the internal TPoint instances needed for the triangular shape using the values in ArrowType and ArrowPointerAngle. It configures the control Canvas with the values in Color, ArrowColor, ShadowColor, and AntiAliasingMode.

Methods in Canvas are called to render the shape. FillRect is called to draw the background for the control Polygon is called to draw both the shadow and the arrow on the control. The MoveTo and LineTo methods are used to draw the lines needed for an unfilled shadow.

Use Color to set the background color for the client area in the shape.

Use ArrowColor to set the color for the Pen and Brush used to draw the arrow shape.

Use ShadowType and ShadowColor to draw a shadow for the shape with the desired color and drawing style.

Paint calls the inherited method prior to exit to signal the OnPaint event handler (when assigned).

Paint is called when the WM_PAINT window message is handled for the control.

## See also

TArrow.ShadowType |  | ShadowType - the type of shadowing: None, In, Out, EtchedIn, EtchedOut.
TArrow.ShadowColor |  | Color used to draw the shadow on the control.
TArrow.ArrowType |  | ArrowType - pointing up, down, left or right.
TArrow.ArrowColor |  | Color used to draw the arrow symbol on the control.
TArrow.ArrowPointerAngle |  | Size of the angle that forms the arrow pointer.
TIndustrialBase.AntiAliasingMode |  | Indicates whether anti-aliased drawing is enabled for the control Canvas.
TGraphicControl.Canvas |  | A clipped window into the parent Canvas.
TGraphicControl.Paint |  | Implements the default handler used to draw the control.
TGraphicControl.OnPaint |  | Event handler signalled to paint the control.