-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'work/improve-apis-and-docs'
- Loading branch information
Showing
57 changed files
with
1,405 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
```ts,runnable | ||
import { | ||
Editor, EditorImage, Stroke, pathToRenderable. | ||
Path, Color4, | ||
Editor, EditorImage, Stroke, Path, Color4, | ||
} from 'js-draw'; | ||
const editor = new Editor(document.body); | ||
const stroke = new Stroke([ | ||
pathToRenderable(Path.fromString('m0,0 l100,100 l0,-10 z'), { fill: Color4.red }), | ||
]); | ||
editor.dispatch(EditorImage.addElement(stroke)); | ||
const stroke = Stroke.fromFilled( | ||
Path.fromString('m0,0 l100,100 l0,-10 z'), | ||
Color4.red, | ||
); | ||
editor.dispatch(EditorImage.addComponent(stroke)); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Components | ||
category: Guides | ||
children: | ||
- ./components/strokes.md | ||
- ./components/custom-components.md | ||
--- | ||
|
||
# Image components | ||
|
||
The guides in this section show: | ||
|
||
- How to change the content of an open editor (erase/duplicate/add strokes). | ||
- How to create custom components. |
Oops, something went wrong.