shape

The shape library provides methods to create shapes likes rectancgles, polygons, circles, and bezier curves.

Summary
shapeThe shape library provides methods to create shapes likes rectancgles, polygons, circles, and bezier curves.
Functions
shape.newRectCreates a rectangle.
shape.newCircleCreate a circle.
shape.newCurveCreate a curve based on a <BezierPath>.

Functions

shape.newRect

function shape.newRect(x,
y,
width,
height)

Creates a rectangle.

Parameters

xThe x coordinate of the center of the rectangle
yThe y coordinate of the center of the rectangle
widthThe width of the rectangle
heightThe height of the rectangle

Returns

The created rectangle.

See Also

<rectangle>

shape.newCircle

function shape.newCircle(x1,
y1,
radius)

Create a circle.

Parameters

xThe x coordinate of the center of the circle
yThe y coordinate of the center of the circle
radiusThe radius of the circle

See Also

<circle>

shape.newCurve

function shape.newCurve(path)

Create a curve based on a <BezierPath>.

Parameters

pathA Bezier path crated with <path.newBezierPath>.

See Also

<BezierCurve><BezierPath>

function shape.newRect(x,
y,
width,
height)
Creates a rectangle.
function shape.newCircle(x1,
y1,
radius)
Create a circle.
function shape.newCurve(path)
Create a curve based on a BezierPath.
Close