Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sangupta/draftboard
A cartesian coordinate based drafting board that can render to SVG and Canvas.
https://github.com/sangupta/draftboard
Last synced: 4 days ago
JSON representation
A cartesian coordinate based drafting board that can render to SVG and Canvas.
- Host: GitHub
- URL: https://github.com/sangupta/draftboard
- Owner: sangupta
- Created: 2022-07-05T20:08:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-20T23:57:05.000Z (about 2 years ago)
- Last Synced: 2024-04-16T11:17:27.639Z (7 months ago)
- Language: TypeScript
- Size: 45.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DraftBoard
`draftboard` is a cartesian coordinate based drafting board that can render to SVG and Canvas.
It is useful in creating `drawings` using the cartesian system, which can then be rendered to
top-left coordinate systems. This allows us to think in mathematical system than thinking in
rendering system.It can be used to create diagrams such as line/pie/bar chart, flow diagrams, gantt charts, etc.
The following are unqiue features of `draftboard`
* Usage of cartesian coordinate system
* Allow moving origin# Shapes
The following simple shapes form the base of `draftboard`:
* Arc
* Circle (also, radial arc)
* Ellipse
* Line
* Polygon
* Polyline
* Rectangle
* TextThese shapes allow us to form complex shapes by composing them in a single object. For example,
a `Triangle.decompose()` will return an array of `Line` instances. Thus, a renderer, which knows
how to render above simple shapes can readily render the following by just invoking the `decompose()`
method. Available composite shapes are:* Marker
* Slice
* Triangle# Author
* [Sandeep Gupta](https://sangupta.com)
# License
MIT License. Copyright (C) 2022, Sandeep Gupta.