Canvas clip - mohayonao/gretro GitHub Wiki
clip
Clips a region of any shape.
Examples

canvas
.clip(10, 20, 260, 80)
.stroke(10).fill(2)
.ellipse(150, 50, 130, 40);
Syntax
canvas.clip(x1, y1, x2, y2);
Parameters
- x1: int
- x-coordinate of the first clipping point
- y1: int
- y-coordinate of the first clipping point
- x2: int
- x-coordinate of the second clipping point
- y2: int
- y-coordinate of the second clipping point
Returns
Canvas: self for method chaining