Skip to main content

CanvasOperationClosePath

Type

statement

Summary

Closes the current subpath of a canvas.

Syntax

close path on <mCanvas>

Description

Adds a line from the previous point to the start of current subpath, signaling the end of the subpath.

Parameters

NameTypeDescription

mCanvas

An expression which evaluates to a canvas.

Examples

// Begin a new subpath on the canvas
move to point [25, 50] on this canvas

// Continue path with a curve through 25,100 to 50,100
curve through point [25,100] to point [50,100] on this canvas

// Close the path
close path on this canvas

// stroke the canvas path
stroke this canvas
Thank you for your feedback!

Was this page helpful?