Search code examples
delphifiremonkey

Draw a line from BottomLeft To TopRight with TLine


Is it possible to draw a diagonal line that runs from Bottomleft to Topright or the other way around.

I can only draw lines from TopLeft to BottomRight.

The Linetype is set to ltDiagonal. The line is always drawn from TopLeft To BottomRight

If set a negative width (bottomright is left of TopLeft), the Tline is not drawn, because the width is set to 0.

Tline(Control).LineType:=TLineType.ltDiagonal;

Solution

  • You can use RotationAngle property. Set it to 90 and the line will be drawn from BottomLeft to TopRight, as well as size dimensions will swap.