Skip to main content

Module drawing

Module drawing 

Source
Expand description

Logical drawing contracts and bounded rectangle/path fill commands.

Re-exports§

pub use crate::shape::Shape;
pub use crate::shape::Styled;
pub use paint::GradientExtend;
pub use paint::GradientSpace;
pub use paint::GradientUnits;
pub use paint::ImagePattern;
pub use paint::LinearGradient;
pub use paint::Paint;
pub use paint::RadialGradient;
pub use paint::SweepGradient;

Modules§

paint
Gradient and static image-pattern descriptions.

Structs§

Canvas
A bounded command recorder passed to content.
DrawContext
Time-independent drawing inputs for the frontend.
PathClip
A checked path used as a coverage mask on an isolated subtree.
RectClip
A local rectangle whose transformed region intersects ancestor rectangles.
ShapeClip
A snapshotted Shape used for geometric intersection, not coverage multiplication.
StrokeStyle
logical-unit stroke style, with explicit caps, joins and dash geometry.

Enums§

BlendMode
Linear-light layer blending, with explicit compositing space.
BlendSpace
Color space used for compositing, independent of stored linear pixels.
ClipGeometry
Immutable rectangle or path geometry used to intersect geometric clipping domains.
ClipMode
How a subtree clip combines with its geometric ancestors.
DrawCommand
A fill or isolated-layer boundary; more primitives await their contracts.
FillRule
How closed contours determine the filled interior.
LineCap
Shape of the ends of an open stroke.
LineJoin
Connection between adjacent stroke segments.
MaskMode
How linear-premultiplied content becomes a layer’s mask coverage.
RenderQuality
Explicit preview approximation policy. Final preserves production rendering.

Constants§

MAX_STROKE_VERBS
Maximum input verbs in one path/curve stroke expansion.

Traits§

Drawable
Content whose bounds and drawing share the same logical coordinates.

Functions§

validate_rect
Rejects nonfinite/inverted corners or nonfinite spans; zero-area rectangles are valid.