Point Pen
The pen provides a range of methods for visibly rendering the point.
Similar to how the draw tools plot or sketch, the pen renders the sketches. This allows you to draw many things and then pen the drawing.
The available functions generally match the draw tools and in many cases use the
sibling function from the draw tools:
let p = new Point(100, 200)
p.pen.fill('red') // Calls p.draw.arc() then ctx.fill()
When imported, the PointPen auto-loads into the Point.pen.
Polypoint.head.lazyProp('Point', {
pen() { return new PointPen(this) }
}, 'pen')
let p = new Point;
p.pen // new instance of PointPen
Meta Data
| title | Point Pen |
| dependencies | () |
| unused_keys | () |
| unknown_keys | () |
| filepath_exists | True |
| path | pointpen |
| filepath | pointpen.js |
| clean_files | () |
-
ClassDeclarationclass
PointPen
extends Noneclass comments:title: Point Pen --- The `pen` provides a range of methods for visibly rendering the point. Similar to how the draw tools _plot_ or _sketch_, the _pen_ renders the sketches. This allows you to _draw_ many things and then _pen_ the drawing. The available functions generally match the `draw` tools and in many cases use the sibling function from the draw tools: let p = new Point(100, 200) p.pen.fill('red') // Calls p.draw.arc() then ctx.fill() --- When imported, the `PointPen` auto-loads into the `Point.pen`. Polypoint.head.lazyProp('Point', { pen() { return new PointPen(this) } }, 'pen') let p = new Point; p.pen // new instance of PointPenDraw functions for the Point.drawExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])