Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomCanvas.Line(TPoint,TPoint,TColor,Integer,TPenStyle) Method

Draws a single straight line on the canvas.

#Declaration

Delphi
procedure Line(const P1: TPoint; const P2: TPoint; AColor: TColor; APenWidth: Integer = 1; APenStyle: TPenStyle = psSolid); overload; virtual;

#Parameters

Name Type
P1 TPoint
P2 TPoint
AColor TColor
APenWidth Integer
APenStyle TPenStyle

#Remarks

Call this procedure and pass two points as the P1 and P2 parameters to connect them with a simple line whose color is passed as the AColor parameter.

See Also