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..."
Native FFI / 原生 FFI
The C-safe buffer-v1 and blocking-callback descriptors, ownership rules, Cirru
EDN transport, and adapters are provided by
calcit_native_ffi. Paint
keeps ownership of the Skia/winit event loop, rendering state, shape decoding,
and callback scheduling. The module requires Calcit 0.13.57.
C-safe buffer-v1/blocking-callback descriptor、ownership 规则、Cirru EDN
transport 与 adapter 由
calcit_native_ffi 统一维护。
Paint 仍负责 Skia/winit 事件循环、绘制状态、shape 解析和回调调度;
模块要求 Calcit 0.13.57。
A custom mirror may be used for Skia binaries when it is known to be healthy:
If the mirror is unavailable, unset SKIA_BINARIES_URL to use rust-skia's
official GitHub release assets. CI deliberately leaves this variable unset.
只在镜像站可用时设置 SKIA_BINARIES_URL;镜像异常时取消该变量,
回退到 rust-skia 的 GitHub Release 产物。CI 不设置该变量。
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