pub struct ScenePaint {
pub kind: PaintKind,
pub a: [f32; 2],
pub b: [f32; 2],
pub spread: u32,
pub stops: Vec<SceneStop>,
pub inverse: Affine,
pub space: [f32; 2],
}Expand description
The paint of a fill, as the generator pass reads a paint: points in the normalized coordinates of the paint’s space, and the transform from device pixels into that space’s pixels.
Fields§
§kind: PaintKindWhat kind of paint.
a: [f32; 2]First point: a linear gradient’s start, another gradient’s centre.
b: [f32; 2]Second point: a linear gradient’s end, a radial gradient’s radius
in b[0], a conic gradient’s start angle in radians in b[0].
spread: u320 pad, 1 repeat, 2 reflect.
stops: Vec<SceneStop>One stop for a solid color, two to eight for a gradient.
inverse: AffineDevice pixels to the paint space’s pixels: the inverse of the transforms of the groups the paint is in.
space: [f32; 2]The size in pixels of the paint’s space: its normalized points are fractions of it, and a radial radius a fraction of its shorter side. A shapes generator’s paints are in its canvas; a layout box’s in the box.