GraphicsPath.AddLineToPoint

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

GraphicsPath.AddLineToPoint(x As Double, y As Double)

New in 2019r2

Supported for all project types and targets.

Draws a line from the CurrentPoint to the specified point.

Parameters

Value Description
x The x coordinate for the end of the line.
y The y coordinate for the end of the line.

Sample Code

Draw a triangle:

Var p As New GraphicsPath
p.MoveToPoint(10, 5) // Start location
p.AddLineToPoint(40, 40)
p.AddLineToPoint(5, 60)

g.DrawingColor = &c0000FF
g.DrawPath(p, True)

// Use FillPath to draw a filled triangle