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
:felt
Center X coordy
:felt
Center Y coordr
:felt
Radiusstart
:felt
Angle to start at, 10000 = 2PI radiansend
:felt
Angle to stop at, 10000 = 2PI radians
Just draws an arc
starting at 0 and ending at 10000 (2 PI)
x
:felt
Center X coordinatey
:felt
Center Y coordr
:felt
Radius
struct Arc
describes the data type for an arc.