Classes
Methods
arc() → {ArcPrimitive}
Begin drawing an arc.
- Source:
Returns:
- the arc.
- Type
- ArcPrimitive
arc() → {ArcPrimitive}
Begin drawing an arc.
- Source:
Returns:
- the arc.
- Type
- ArcPrimitive
background() → {Background}
Specify a color with which the background should be cleared.
- Source:
Returns:
- the background
- Type
- Background
background() → {Background}
Specify a color with which the background should be cleared.
- Source:
Returns:
- the background
- Type
- Background
bezier() → {BezierPrimitive}
Begin drawing a bezier curve.
- Source:
Returns:
- Type
- BezierPrimitive
bezier() → {BezierPrimitive}
Begin drawing a bezier curve.
- Source:
Returns:
- Type
- BezierPrimitive
blendMode(mode)
Sets the blend mode operation to use.
Parameters:
Name | Type | Description |
---|---|---|
mode |
BlendMode | the blend mode |
- Source:
blendMode(mode)
Sets the blend mode operation to use.
Parameters:
Name | Type | Description |
---|---|---|
mode |
BlendMode | the blend mode |
- Source:
circle() → {ArcPrimitive}
Begin drawing a circle.
Shorthand for app.pen().arc().circle()
- Source:
Returns:
the circle
- Type
- ArcPrimitive
circle() → {ArcPrimitive}
Begin drawing a circle.
Shorthand for app.pen().arc().circle()
- Source:
Returns:
the circle
- Type
- ArcPrimitive
line() → {LinePrimitive}
Begin drawing a line.
- Source:
Returns:
- the line
- Type
- LinePrimitive
line() → {LinePrimitive}
Begin drawing a line.
- Source:
Returns:
- the line
- Type
- LinePrimitive
origin(x, y) → {Drawer}
Translate the position of the origin to the
given coordinates.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the origin x coordinate |
y |
number | the origin y coordinate |
- Source:
Returns:
- Type
- Drawer
origin(x, y) → {Drawer}
Translate the position of the origin to the
given coordinates.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the origin x coordinate |
y |
number | the origin y coordinate |
- Source:
Returns:
- Type
- Drawer
pixelbuffer(bufferModifyFn) → {ModifyPixelBuffer}
Modify the pixel buffer in a function.
Parameters:
Name | Type | Description |
---|---|---|
bufferModifyFn |
* | the pixel buffer modify function |
- Source:
Returns:
- Type
- ModifyPixelBuffer
pixelbuffer(bufferModifyFn) → {ModifyPixelBuffer}
Modify the pixel buffer in a function.
Parameters:
Name | Type | Description |
---|---|---|
bufferModifyFn |
* | the pixel buffer modify function |
- Source:
Returns:
- Type
- ModifyPixelBuffer
plot()
Finish the frame and submit all the
draw commands to the backend which
handles all the drawing to the canvas
or plotting to paper.
- Source:
plot()
Finish the frame and submit all the
draw commands to the backend which
handles all the drawing to the canvas
or plotting to paper.
- Source:
point() → {PointPrimitive}
Begin drawing a point.
- Source:
Returns:
- Type
- PointPrimitive
point() → {PointPrimitive}
Begin drawing a point.
- Source:
Returns:
- Type
- PointPrimitive
poly() → {PolygonPrimitive}
Begin drawing a polygon.
- Source:
Returns:
- Type
- PolygonPrimitive
poly() → {PolygonPrimitive}
Begin drawing a polygon.
- Source:
Returns:
- Type
- PolygonPrimitive
rect() → {RectPrimitive}
Begin drawing a rect.
- Source:
Returns:
- the rectangle
- Type
- RectPrimitive
rect() → {RectPrimitive}
Begin drawing a rect.
- Source:
Returns:
- the rectangle
- Type
- RectPrimitive
reset()
Reset the state in the Drawer instance.
- Source:
reset()
Reset the state in the Drawer instance.
- Source:
rotate(rotation) → {Drawer}
Rotate the canvas globally for all draw commands.
Parameters:
Name | Type | Description |
---|---|---|
rotation |
number | the rotation |
- Source:
Returns:
- Type
- Drawer
rotate(rotation) → {Drawer}
Rotate the canvas globally for all draw commands.
Parameters:
Name | Type | Description |
---|---|---|
rotation |
number | the rotation |
- Source:
Returns:
- Type
- Drawer
text() → {TextPrimitive}
Begin drawing text.
- Source:
Returns:
- Type
- TextPrimitive
text() → {TextPrimitive}
Begin drawing text.
- Source:
Returns:
- Type
- TextPrimitive