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, with points normalized to the paint’s space and a transform from device pixels into that space.
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, or in b[0] a radial radius or a conic start angle
in radians.
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 paint-space pixels (the inverse of the enclosing group transforms).
space: [f32; 2]Paint-space size in pixels. Normalized points are fractions of it, and a radial radius is a fraction of its shorter side.
Trait Implementations§
Source§impl Clone for ScenePaint
impl Clone for ScenePaint
Source§impl Debug for ScenePaint
impl Debug for ScenePaint
Source§impl PartialEq for ScenePaint
impl PartialEq for ScenePaint
impl StructuralPartialEq for ScenePaint
Auto Trait Implementations§
impl Freeze for ScenePaint
impl RefUnwindSafe for ScenePaint
impl Send for ScenePaint
impl Sync for ScenePaint
impl Unpin for ScenePaint
impl UnsafeUnpin for ScenePaint
impl UnwindSafe for ScenePaint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more