infinite-canvas-tutorial
infinite-canvas-tutorial copied to clipboard
A tutorial on infinite canvas
Unlike Figma exporter, for simple inline text, we can use `` and inlined CSS style. https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text#example ```html .small { font: italic 13px sans-serif; } My ``` The following properties should...
If we want to place a paragraph in a container, keeping it centered horizontally and vertically: ```ts const container = new Rect({ x: 0, y: 0, width: 100, height: 100,...
Re-assign `fillStyle` after rendered: ```ts roughShape.fillStyle = 'dots'; ```
```ts const rect = new RoughRect({ x: 50, y: 50, width: 100, height: 100, fill: 'black', fillStyle: 'dots' }); ``` ``` RangeError: Maximum call stack size exceeded ```