Interface for shape rasterization and manipulation.

Methods

clone ():Shape

Creates a deep copy of the shape.

Returns:

A deep copy of the shape object.

getRawShapeData ():Array<Float>

Gets a vector of data that represents the shape geometry, the format varies depending on the ShapeType.

Returns:

The shape data.

getSvgShapeData ():String

Gets a string that represents a SVG element that describes the shape geometry.

Returns:

The SVG shape data that represents this shape.

getType ():ShapeType

Gets the ShapeType of the shape.

Returns:

The ShapeType of the shape.

mutate ():Void

Modifies the shape a little, typically with a random component. For improving the shape's fit to a bitmap (trial-and-error style).

rasterize ():Array<Scanline>

Creates a raster scanline representation of the shape.

Returns:

Array of raster scanlines representing the shape.