From Xojo Documentation

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

iOSGraphics.ClipToRect(x As Double, y As Double, width As Double, height As Double)

Supported on Mobile(iOS).

Clips the drawing to the specified rectangle.

Sample Code

From within an iOSCanvas.Paint event handler:

// The part of the circle drawn outside the clip area
// is not displayed.
g.ClipToRect(0, 0, 50, 50)

g.FillColor = Color.Blue
g.FillOval(25, 25, 50, 50)