Expand description
2D drawing abstraction that allows applications/frameworks to support many rendering backends through a unified API.
§Painting a scene
The core abstraction in AnyRender is the PaintScene trait.
PaintScene is a “sink” which accepts drawing commands:
- Applications and libraries draw by pushing commands into a
PaintScene - Backends execute those commands to produce an output
§Rendering to surface or buffer
In addition to PaintScene, there is:
- The
ImageRenderertrait which provides an abstraction for rendering to aVec<u8>RGBA8 buffer. - The
WindowRenderertrait which provides an abstraction for rendering to a surface/window
§SVG
The anyrender_svg crate allows SVGs to be rendered using AnyRender
§Backends
Currently existing backends are:
Re-exports§
pub use wasm_send_sync::*;pub use types::*;
Modules§
- types
- Types that are used within the Anyrender traits
- wasm_
send_ sync - Traits that imply
Send/Synconly on non-wasm platforms. For interop with wgpu.
Structs§
Traits§
- Image
Renderer - Abstraction for rendering a scene to an image buffer
- Paint
Scene - Abstraction for drawing a 2D scene
- Window
Renderer - Abstraction for rendering a scene to a window
Functions§
- render_
to_ buffer - Draw a scene to a buffer using an
ImageRenderer