iOSGraphics.ClipToPath

From Xojo Documentation

Method

iOSGraphics.ClipToPath(path As iOSPath)

Supported on Mobile(iOS).

Clips the drawing to the specified path.

Sample Code

From within an iOSCanvas.Paint event handler:

// Clip to an iOSPath
// Path is a triangle
Var p As New iOSPath
p.MoveToPoint(0, 0) ' Start location
p.LineToPoint(20, 44)
p.LineToPoint(40, 0)
p.LineToPoint(0, 0)

g.ClipToPath(p)
g.FillOval(0, 0, 50, 50)