graph TD
A[You type Cairo in browser] --Cairo sent to server--> B(Server)
B --Returns Cairo output--> C((Renderer))
C -->|Error| Err[The error shows up in raw output]
C -->|Not an error| E[Canvas renders something]
- Clone the repo
- Do
cargo run cairo-rest-server - Go to localhost:8080 to have a play!
Right now you can draw arcs or circles. The initial spec was to just do circles which is like hello world for a graphics thing.
For now the canvas is 512px high and wide.
Draws an arc between start and end angles.
x:feltCenter X coordy:feltCenter Y coordr:feltRadiusstart:feltAngle to start at, 10000 = 2PI radiansend:feltAngle to stop at, 10000 = 2PI radians
Just draws an arc starting at 0 and ending at 10000 (2 PI)
x:feltCenter X coordinatey:feltCenter Y coordr:feltRadius
struct Arc describes the data type for an arc.