const { LazyCanvas, LineLayer } = require('@hitomihiumi/lazy-canvas')let line = new LineLayer().setPoints({ x: 10, y: 10 }, { x: 100, y: 100 }).setColor('#fff').setStroke(5).setLineDash([10, 5])const lazy = new LazyCanvas().addLayers(line)//... Copy
const { LazyCanvas, LineLayer } = require('@hitomihiumi/lazy-canvas')let line = new LineLayer().setPoints({ x: 10, y: 10 }, { x: 100, y: 100 }).setColor('#fff').setStroke(5).setLineDash([10, 5])const lazy = new LazyCanvas().addLayers(line)//...
Optional
The alpha value of the layer
The color of the figure
The global composite operation of the layer
The lineDash of the figure
Rest
The points of the line
The angle of rotation the layer
The degree of shadow blur
The shadow color for the layer
The X-axis offset of the shadow relative to the layer
The Y-axis offset of the shadow relative to the layer
The stroke of the figure
The x position of the layer
The y position of the layer
Example