pub enum ResolvedPaint<'a> {
Show 13 variants
ColrLayers {
range: Range<usize>,
},
Solid {
palette_index: u16,
alpha: f32,
},
LinearGradient {
x0: f32,
y0: f32,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
color_stops: ColorStops<'a>,
extend: Extend,
},
RadialGradient {
x0: f32,
y0: f32,
radius0: f32,
x1: f32,
y1: f32,
radius1: f32,
color_stops: ColorStops<'a>,
extend: Extend,
},
SweepGradient {
center_x: f32,
center_y: f32,
start_angle: f32,
end_angle: f32,
color_stops: ColorStops<'a>,
extend: Extend,
},
Glyph {
glyph_id: GlyphId16,
paint: Paint<'a>,
},
ColrGlyph {
glyph_id: GlyphId16,
},
Transform {
xx: f32,
yx: f32,
xy: f32,
yy: f32,
dx: f32,
dy: f32,
paint: Paint<'a>,
},
Translate {
dx: f32,
dy: f32,
paint: Paint<'a>,
},
Scale {
scale_x: f32,
scale_y: f32,
around_center: Option<Point<f32>>,
paint: Paint<'a>,
},
Rotate {
angle: f32,
around_center: Option<Point<f32>>,
paint: Paint<'a>,
},
Skew {
x_skew_angle: f32,
y_skew_angle: f32,
around_center: Option<Point<f32>>,
paint: Paint<'a>,
},
Composite {
source_paint: Paint<'a>,
mode: CompositeMode,
backdrop_paint: Paint<'a>,
},
}
Expand description
Simplified version of Paint
with applied variation deltas.
These are constructed with the resolve_paint
function.
This is roughly equivalent to FreeType’s
FT_COLR_Paint
type.
Variants§
ColrLayers
Solid
LinearGradient
RadialGradient
Fields
§
color_stops: ColorStops<'a>
SweepGradient
Fields
§
color_stops: ColorStops<'a>
Glyph
ColrGlyph
Transform
Translate
Scale
Rotate
Skew
Composite
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ResolvedPaint<'a>
impl<'a> RefUnwindSafe for ResolvedPaint<'a>
impl<'a> Send for ResolvedPaint<'a>
impl<'a> Sync for ResolvedPaint<'a>
impl<'a> Unpin for ResolvedPaint<'a>
impl<'a> UnwindSafe for ResolvedPaint<'a>
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