docs.rs failed to build calcit_paint-0.0.7
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
(Toy)Calcit Paint
2D renderer for Calcit.
Usages
It runs Calcit and is driven by the canonical calcit.cirru Snapshot source.
Available APIs:
calcit-paint.core/push-drawing-data! |reset-canvas! nil
calcit-paint.core/push-drawing-data! |render-canvas! shape-data
calcit-paint.core/launch-canvas! $ fn (event)
println "|rendering to canvas..."
Maybe we will need a mirror URL for skia binaries like https://cdn.tiye.me/skia-binaries/ :
Shapes
Position represented with [] x y. Color with [] h s l a?
Drawing with lyon 0.17.5:
- Rect, using
rectorrectangle:
rect ,
- Group, using
group
Group ,
- Circle, using
circle
Circle ,
Arc is not supported at current.
- Text, using
text
Text ,
- Paint operations, with
ops
PaintOps ,
It's rendered based on lyon SVG path builder. Only small subset:
[]
[] :move-to ([] 1 2)
[] :line-to ([] 3 4)
[] :quadratic-bezier-to ([] 5 6) ([] 7 8)
[] :cubic-bezier-to ([] 1 2) ([] 3 4) ([] 5 6)
Since then name is too long, I also use alies:
bezier2-to -> quadratic-bezier-to, and
bezier3-to -> cubic-bezier-to.
- Polyline, using
polyline
Polyline ,
- Image, using
image, andRectfrom Skia
Image
- Touch Area, using
touch-area
For handling events:
TouchArea ,
- Key listener, using
key-listener
KeyListener ,
- Rotate
Rotate
- Translate
Translate
- Scale
Scale
License
MIT