Crate ribir_painter

Crate ribir_painter 

Source
Expand description

A 2d logic painter, generate the paint command

Re-exports§

pub use crate::color::Color;
pub use crate::color::GradientStop;
pub use crate::color::LightnessTone;
pub use crate::image::PixelImage;
pub use path::*;

Modules§

color
image
path
path_builder

Structs§

Painter
The painter is a two-dimensional grid. The coordinate (0, 0) is at the upper-left corner of the canvas. Along the X-axis, values increase towards the right edge of the canvas. Along the Y-axis, values increase towards the bottom edge of the canvas.
PainterGuard
An RAII implementation of a “scoped state” of the render layer. When this structure is dropped (falls out of scope), changed state will auto restore. The data can be accessed through this guard via its Deref and DerefMut implementations.
PainterResult
PathCommand
A path and its geometry information are friendly to paint and cache.
Svg

Enums§

Brush
PaintCommand
PaintPath
The enum of path types, which can be either shared or owned. This suggests that if the path is shared among multiple commands, it can be cached for efficiency.
PaintPathAction
The action to apply to the path, such as fill color, image, gradient, etc.
SpreadMethod

Traits§

PainterBackend
PainterBackend use to draw textures for every frame, All draw_commands will called between begin_frame and end_frame