new PhotoEditorSDK.Operations.BrushOperation.Path(operation, options, canvas)
sdk/operations/sprites/brush/path.js, line 26
Creates a Path
Name | Type | Description |
---|---|---|
operation |
PhotoEditorSDK.Operations.BrushOperation | |
options |
Object | |
canvas |
HTMLCanvasElement |
Extends
Methods
-
addControlPoint(position)
sdk/operations/sprites/brush/path.js, line 118 -
Adds a control point at the given position to this path
Name Type Description position
PhotoEditorSDK.Math.Vector2 -
forEachControlPoint(iterator)
sdk/operations/sprites/brush/path.js, line 156 -
Calls
iterator
for each control pointName Type Description iterator
function -
getCanvas(){Canvas}
sdk/operations/sprites/brush/path.js, line 128 -
Returns this path's canvas
Returns:
Type Description Canvas -
getCanvasDimensions(){PhotoEditorSDK.Math.Vector2}
sdk/operations/sprites/brush/path.js, line 176 -
Returns the canvas dimension for this path
Returns:
Type Description PhotoEditorSDK.Math.Vector2 -
getClosed(){undefined}
-
Returns the closed
Returns:
Name Type Description closed
undefined The closed -
getColor(){undefined}
-
Returns the color
Returns:
Name Type Description color
undefined The color -
getControlPoints(){undefined}
-
Returns the controlPoints
Returns:
Name Type Description controlPoints
undefined The controlPoints -
getHardness(){undefined}
-
Returns the hardness
Returns:
Name Type Description hardness
undefined The hardness -
getId(){undefined}
-
Returns the id
Returns:
Name Type Description id
undefined The id -
getThickness(){undefined}
-
Returns the thickness
Returns:
Name Type Description thickness
undefined The thickness -
render(inputDimensions)
sdk/operations/sprites/brush/path.js, line 46 -
Draws this path onto its canvas
Name Type Description inputDimensions
PhotoEditorSDK.Math.Vector2 -
renderToCanvas(canvas)
sdk/operations/sprites/brush/path.js, line 164 -
Renders this path to the given canvas with the right opacity
Name Type Description canvas
Canvas -
setCanvas(canvas)
sdk/operations/sprites/brush/path.js, line 136 -
Sets the given canvas
Name Type Description canvas
HTMLCanvasElement -
setClosed(closed)
-
Sets the closed
Name Type Description closed
undefined -
setColor(color)
-
Sets the color
Name Type Description color
undefined -
setControlPoints(controlPoints)
-
Sets the controlPoints
Name Type Description controlPoints
undefined -
setDirty()
sdk/operations/sprites/brush/path.js, line 144 -
Sets this path to dirty
-
setHardness(hardness)
-
Sets the hardness
Name Type Description hardness
undefined -
setId(id)
-
Sets the id
Name Type Description id
undefined -
setThickness(thickness)
-
Sets the thickness
Name Type Description thickness
undefined