You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: engine/src/canvas.lcb
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4288,6 +4288,7 @@ public foreign handler MCCanvasFillPath(in pPath as Path, in pCanvas as Canvas)
4288
4288
public foreign handler MCCanvasStroke(in pCanvas as Canvas) returns nothing binds to "<builtin>"
4289
4289
public foreign handler MCCanvasStrokePath(in pPath as Path, in pCanvas as Canvas) returns nothing binds to "<builtin>"
4290
4290
public foreign handler MCCanvasClipToRect(in pClip as Rectangle, in pCanvas as Canvas) returns nothing binds to "<builtin>"
4291
+
public foreign handler MCCanvasClipToPath(in pClip as Path, in pCanvas as Canvas) returns nothing binds to "<builtin>"
4291
4292
public foreign handler MCCanvasAddPath(in pPath as Path, in pCanvas as Canvas) returns nothing binds to "<builtin>"
4292
4293
public foreign handler MCCanvasDrawImage(in pImage as Image, in pDest as Rectangle, in pCanvas as Canvas) returns nothing binds to "<builtin>"
4293
4294
public foreign handler MCCanvasDrawRectOfImage(in pSrc as Rectangle, in pImage as Image, in pDst as Rectangle, in pCanvas as Canvas) returns nothing binds to "<builtin>"
@@ -4612,6 +4613,31 @@ end syntax
4612
4613
4613
4614
//////////
4614
4615
4616
+
/**
4617
+
Summary: Clip to a path on a canvas.
4618
+
4619
+
mCanvas: An expression which evaluates to a canvas.
4620
+
mPath: An expression which evaluates to a path.
4621
+
4622
+
Description: Modifies the clip of <mCanvas> by intersecting with <mRect>. Drawing operations on <mCanvas> will be confined to the clip region.
4623
+
4624
+
Example:
4625
+
// Set the canvas clip
4626
+
clip to circle path centered at point [100,100] with radius 50 on this canvas
4627
+
4628
+
// Fill rectangle path on canvas. only the region of the rectangle that falls within the canvas clip will be rendered.
4629
+
fill rectangle path of rectangle [25, 25, 75, 75] on this canvas
0 commit comments