stroke
Meta Data
| filepath_exists | True |
| path | stroke |
| filepath | stroke.js |
| clean_files | () |
-
VariableDeclaration
-
VariableDeclaration
-
VariableDeclaration
-
ClassDeclarationclass
Stroke
extends SetUnsetclass comments:ctx properties of which don't need map adapting,-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])The given key should be the "march" param, and the value applied within the setup. Apply marching ants by applying the internal stepper value as the lineDashOffset.
ClassDeclarationclassStageStrokeMap
extends Noneclass comments:Create and and manage Strokes, using a name. const fooStroke = stage.strokes.create('foo',{ dash: [3,3] , color: 'grey' , width: 2 }) Call set to apply, unset to unapply: fooStroke.set(ctx) fooStroke.set() fooStroke.set(ctx) fooStroke.unset() Fetch the same stroker: let fooStroke = stage.strokes.get('fooStroke') Or call the stroke object directly: stage.strokes.fooStroke.set() stage.strokes.fooStroke.unset() Call 'set' on the stroke object to perform the same as above: stage.strokes.set('line') stage.line.render(ctx) stage.strokes.unset('line') Run in place, immediately enabling the stroke styles: let off = stage.strokes.line() stage.line.render(ctx) off() Or for less code, provide a function to the immediate caller, to run inline: // set 'line' // run the given function // unset 'line' stage.strokes.line(()=>stage.line.render(ctx))ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])VariableDeclaration