pub enum Paint {
Show 32 variants
ColrLayers(PaintColrLayers),
Solid(PaintSolid),
VarSolid(PaintVarSolid),
LinearGradient(PaintLinearGradient),
VarLinearGradient(PaintVarLinearGradient),
RadialGradient(PaintRadialGradient),
VarRadialGradient(PaintVarRadialGradient),
SweepGradient(PaintSweepGradient),
VarSweepGradient(PaintVarSweepGradient),
Glyph(PaintGlyph),
ColrGlyph(PaintColrGlyph),
Transform(PaintTransform),
VarTransform(PaintVarTransform),
Translate(PaintTranslate),
VarTranslate(PaintVarTranslate),
Scale(PaintScale),
VarScale(PaintVarScale),
ScaleAroundCenter(PaintScaleAroundCenter),
VarScaleAroundCenter(PaintVarScaleAroundCenter),
ScaleUniform(PaintScaleUniform),
VarScaleUniform(PaintVarScaleUniform),
ScaleUniformAroundCenter(PaintScaleUniformAroundCenter),
VarScaleUniformAroundCenter(PaintVarScaleUniformAroundCenter),
Rotate(PaintRotate),
VarRotate(PaintVarRotate),
RotateAroundCenter(PaintRotateAroundCenter),
VarRotateAroundCenter(PaintVarRotateAroundCenter),
Skew(PaintSkew),
VarSkew(PaintVarSkew),
SkewAroundCenter(PaintSkewAroundCenter),
VarSkewAroundCenter(PaintVarSkewAroundCenter),
Composite(PaintComposite),
}
Expand description
Paint tables
Variants§
ColrLayers(PaintColrLayers)
Solid(PaintSolid)
VarSolid(PaintVarSolid)
LinearGradient(PaintLinearGradient)
VarLinearGradient(PaintVarLinearGradient)
RadialGradient(PaintRadialGradient)
VarRadialGradient(PaintVarRadialGradient)
SweepGradient(PaintSweepGradient)
VarSweepGradient(PaintVarSweepGradient)
Glyph(PaintGlyph)
ColrGlyph(PaintColrGlyph)
Transform(PaintTransform)
VarTransform(PaintVarTransform)
Translate(PaintTranslate)
VarTranslate(PaintVarTranslate)
Scale(PaintScale)
VarScale(PaintVarScale)
ScaleAroundCenter(PaintScaleAroundCenter)
VarScaleAroundCenter(PaintVarScaleAroundCenter)
ScaleUniform(PaintScaleUniform)
VarScaleUniform(PaintVarScaleUniform)
ScaleUniformAroundCenter(PaintScaleUniformAroundCenter)
VarScaleUniformAroundCenter(PaintVarScaleUniformAroundCenter)
Rotate(PaintRotate)
VarRotate(PaintVarRotate)
RotateAroundCenter(PaintRotateAroundCenter)
VarRotateAroundCenter(PaintVarRotateAroundCenter)
Skew(PaintSkew)
VarSkew(PaintVarSkew)
SkewAroundCenter(PaintSkewAroundCenter)
VarSkewAroundCenter(PaintVarSkewAroundCenter)
Composite(PaintComposite)
Implementations§
Source§impl Paint
impl Paint
Sourcepub fn colr_layers(num_layers: u8, first_layer_index: u32) -> Self
pub fn colr_layers(num_layers: u8, first_layer_index: u32) -> Self
Construct a new PaintColrLayers
subtable
Sourcepub fn var_solid(
palette_index: u16,
alpha: F2Dot14,
var_index_base: u32,
) -> Self
pub fn var_solid( palette_index: u16, alpha: F2Dot14, var_index_base: u32, ) -> Self
Construct a new PaintVarSolid
subtable
Sourcepub fn linear_gradient(
color_line: ColorLine,
x0: FWord,
y0: FWord,
x1: FWord,
y1: FWord,
x2: FWord,
y2: FWord,
) -> Self
pub fn linear_gradient( color_line: ColorLine, x0: FWord, y0: FWord, x1: FWord, y1: FWord, x2: FWord, y2: FWord, ) -> Self
Construct a new PaintLinearGradient
subtable
Sourcepub fn var_linear_gradient(
color_line: VarColorLine,
x0: FWord,
y0: FWord,
x1: FWord,
y1: FWord,
x2: FWord,
y2: FWord,
var_index_base: u32,
) -> Self
pub fn var_linear_gradient( color_line: VarColorLine, x0: FWord, y0: FWord, x1: FWord, y1: FWord, x2: FWord, y2: FWord, var_index_base: u32, ) -> Self
Construct a new PaintVarLinearGradient
subtable
Sourcepub fn radial_gradient(
color_line: ColorLine,
x0: FWord,
y0: FWord,
radius0: UfWord,
x1: FWord,
y1: FWord,
radius1: UfWord,
) -> Self
pub fn radial_gradient( color_line: ColorLine, x0: FWord, y0: FWord, radius0: UfWord, x1: FWord, y1: FWord, radius1: UfWord, ) -> Self
Construct a new PaintRadialGradient
subtable
Sourcepub fn var_radial_gradient(
color_line: VarColorLine,
x0: FWord,
y0: FWord,
radius0: UfWord,
x1: FWord,
y1: FWord,
radius1: UfWord,
var_index_base: u32,
) -> Self
pub fn var_radial_gradient( color_line: VarColorLine, x0: FWord, y0: FWord, radius0: UfWord, x1: FWord, y1: FWord, radius1: UfWord, var_index_base: u32, ) -> Self
Construct a new PaintVarRadialGradient
subtable
Sourcepub fn sweep_gradient(
color_line: ColorLine,
center_x: FWord,
center_y: FWord,
start_angle: F2Dot14,
end_angle: F2Dot14,
) -> Self
pub fn sweep_gradient( color_line: ColorLine, center_x: FWord, center_y: FWord, start_angle: F2Dot14, end_angle: F2Dot14, ) -> Self
Construct a new PaintSweepGradient
subtable
Sourcepub fn var_sweep_gradient(
color_line: VarColorLine,
center_x: FWord,
center_y: FWord,
start_angle: F2Dot14,
end_angle: F2Dot14,
var_index_base: u32,
) -> Self
pub fn var_sweep_gradient( color_line: VarColorLine, center_x: FWord, center_y: FWord, start_angle: F2Dot14, end_angle: F2Dot14, var_index_base: u32, ) -> Self
Construct a new PaintVarSweepGradient
subtable
Sourcepub fn colr_glyph(glyph_id: GlyphId16) -> Self
pub fn colr_glyph(glyph_id: GlyphId16) -> Self
Construct a new PaintColrGlyph
subtable
Sourcepub fn transform(paint: Paint, transform: Affine2x3) -> Self
pub fn transform(paint: Paint, transform: Affine2x3) -> Self
Construct a new PaintTransform
subtable
Sourcepub fn var_transform(paint: Paint, transform: VarAffine2x3) -> Self
pub fn var_transform(paint: Paint, transform: VarAffine2x3) -> Self
Construct a new PaintVarTransform
subtable
Sourcepub fn translate(paint: Paint, dx: FWord, dy: FWord) -> Self
pub fn translate(paint: Paint, dx: FWord, dy: FWord) -> Self
Construct a new PaintTranslate
subtable
Sourcepub fn var_translate(
paint: Paint,
dx: FWord,
dy: FWord,
var_index_base: u32,
) -> Self
pub fn var_translate( paint: Paint, dx: FWord, dy: FWord, var_index_base: u32, ) -> Self
Construct a new PaintVarTranslate
subtable
Sourcepub fn scale(paint: Paint, scale_x: F2Dot14, scale_y: F2Dot14) -> Self
pub fn scale(paint: Paint, scale_x: F2Dot14, scale_y: F2Dot14) -> Self
Construct a new PaintScale
subtable
Sourcepub fn var_scale(
paint: Paint,
scale_x: F2Dot14,
scale_y: F2Dot14,
var_index_base: u32,
) -> Self
pub fn var_scale( paint: Paint, scale_x: F2Dot14, scale_y: F2Dot14, var_index_base: u32, ) -> Self
Construct a new PaintVarScale
subtable
Sourcepub fn scale_around_center(
paint: Paint,
scale_x: F2Dot14,
scale_y: F2Dot14,
center_x: FWord,
center_y: FWord,
) -> Self
pub fn scale_around_center( paint: Paint, scale_x: F2Dot14, scale_y: F2Dot14, center_x: FWord, center_y: FWord, ) -> Self
Construct a new PaintScaleAroundCenter
subtable
Sourcepub fn var_scale_around_center(
paint: Paint,
scale_x: F2Dot14,
scale_y: F2Dot14,
center_x: FWord,
center_y: FWord,
var_index_base: u32,
) -> Self
pub fn var_scale_around_center( paint: Paint, scale_x: F2Dot14, scale_y: F2Dot14, center_x: FWord, center_y: FWord, var_index_base: u32, ) -> Self
Construct a new PaintVarScaleAroundCenter
subtable
Sourcepub fn scale_uniform(paint: Paint, scale: F2Dot14) -> Self
pub fn scale_uniform(paint: Paint, scale: F2Dot14) -> Self
Construct a new PaintScaleUniform
subtable
Sourcepub fn var_scale_uniform(
paint: Paint,
scale: F2Dot14,
var_index_base: u32,
) -> Self
pub fn var_scale_uniform( paint: Paint, scale: F2Dot14, var_index_base: u32, ) -> Self
Construct a new PaintVarScaleUniform
subtable
Sourcepub fn scale_uniform_around_center(
paint: Paint,
scale: F2Dot14,
center_x: FWord,
center_y: FWord,
) -> Self
pub fn scale_uniform_around_center( paint: Paint, scale: F2Dot14, center_x: FWord, center_y: FWord, ) -> Self
Construct a new PaintScaleUniformAroundCenter
subtable
Sourcepub fn var_scale_uniform_around_center(
paint: Paint,
scale: F2Dot14,
center_x: FWord,
center_y: FWord,
var_index_base: u32,
) -> Self
pub fn var_scale_uniform_around_center( paint: Paint, scale: F2Dot14, center_x: FWord, center_y: FWord, var_index_base: u32, ) -> Self
Construct a new PaintVarScaleUniformAroundCenter
subtable
Sourcepub fn var_rotate(paint: Paint, angle: F2Dot14, var_index_base: u32) -> Self
pub fn var_rotate(paint: Paint, angle: F2Dot14, var_index_base: u32) -> Self
Construct a new PaintVarRotate
subtable
Sourcepub fn rotate_around_center(
paint: Paint,
angle: F2Dot14,
center_x: FWord,
center_y: FWord,
) -> Self
pub fn rotate_around_center( paint: Paint, angle: F2Dot14, center_x: FWord, center_y: FWord, ) -> Self
Construct a new PaintRotateAroundCenter
subtable
Sourcepub fn var_rotate_around_center(
paint: Paint,
angle: F2Dot14,
center_x: FWord,
center_y: FWord,
var_index_base: u32,
) -> Self
pub fn var_rotate_around_center( paint: Paint, angle: F2Dot14, center_x: FWord, center_y: FWord, var_index_base: u32, ) -> Self
Construct a new PaintVarRotateAroundCenter
subtable
Sourcepub fn skew(paint: Paint, x_skew_angle: F2Dot14, y_skew_angle: F2Dot14) -> Self
pub fn skew(paint: Paint, x_skew_angle: F2Dot14, y_skew_angle: F2Dot14) -> Self
Construct a new PaintSkew
subtable
Sourcepub fn var_skew(
paint: Paint,
x_skew_angle: F2Dot14,
y_skew_angle: F2Dot14,
var_index_base: u32,
) -> Self
pub fn var_skew( paint: Paint, x_skew_angle: F2Dot14, y_skew_angle: F2Dot14, var_index_base: u32, ) -> Self
Construct a new PaintVarSkew
subtable
Sourcepub fn skew_around_center(
paint: Paint,
x_skew_angle: F2Dot14,
y_skew_angle: F2Dot14,
center_x: FWord,
center_y: FWord,
) -> Self
pub fn skew_around_center( paint: Paint, x_skew_angle: F2Dot14, y_skew_angle: F2Dot14, center_x: FWord, center_y: FWord, ) -> Self
Construct a new PaintSkewAroundCenter
subtable
Sourcepub fn var_skew_around_center(
paint: Paint,
x_skew_angle: F2Dot14,
y_skew_angle: F2Dot14,
center_x: FWord,
center_y: FWord,
var_index_base: u32,
) -> Self
pub fn var_skew_around_center( paint: Paint, x_skew_angle: F2Dot14, y_skew_angle: F2Dot14, center_x: FWord, center_y: FWord, var_index_base: u32, ) -> Self
Construct a new PaintVarSkewAroundCenter
subtable
Sourcepub fn composite(
source_paint: Paint,
composite_mode: CompositeMode,
backdrop_paint: Paint,
) -> Self
pub fn composite( source_paint: Paint, composite_mode: CompositeMode, backdrop_paint: Paint, ) -> Self
Construct a new PaintComposite
subtable
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Paint
impl<'de> Deserialize<'de> for Paint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FontWrite for Paint
impl FontWrite for Paint
Source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
Source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
Source§impl From<PaintColrGlyph> for Paint
impl From<PaintColrGlyph> for Paint
Source§fn from(src: PaintColrGlyph) -> Paint
fn from(src: PaintColrGlyph) -> Paint
Source§impl From<PaintColrLayers> for Paint
impl From<PaintColrLayers> for Paint
Source§fn from(src: PaintColrLayers) -> Paint
fn from(src: PaintColrLayers) -> Paint
Source§impl From<PaintComposite> for Paint
impl From<PaintComposite> for Paint
Source§fn from(src: PaintComposite) -> Paint
fn from(src: PaintComposite) -> Paint
Source§impl From<PaintGlyph> for Paint
impl From<PaintGlyph> for Paint
Source§fn from(src: PaintGlyph) -> Paint
fn from(src: PaintGlyph) -> Paint
Source§impl From<PaintLinearGradient> for Paint
impl From<PaintLinearGradient> for Paint
Source§fn from(src: PaintLinearGradient) -> Paint
fn from(src: PaintLinearGradient) -> Paint
Source§impl From<PaintRadialGradient> for Paint
impl From<PaintRadialGradient> for Paint
Source§fn from(src: PaintRadialGradient) -> Paint
fn from(src: PaintRadialGradient) -> Paint
Source§impl From<PaintRotate> for Paint
impl From<PaintRotate> for Paint
Source§fn from(src: PaintRotate) -> Paint
fn from(src: PaintRotate) -> Paint
Source§impl From<PaintRotateAroundCenter> for Paint
impl From<PaintRotateAroundCenter> for Paint
Source§fn from(src: PaintRotateAroundCenter) -> Paint
fn from(src: PaintRotateAroundCenter) -> Paint
Source§impl From<PaintScale> for Paint
impl From<PaintScale> for Paint
Source§fn from(src: PaintScale) -> Paint
fn from(src: PaintScale) -> Paint
Source§impl From<PaintScaleAroundCenter> for Paint
impl From<PaintScaleAroundCenter> for Paint
Source§fn from(src: PaintScaleAroundCenter) -> Paint
fn from(src: PaintScaleAroundCenter) -> Paint
Source§impl From<PaintScaleUniform> for Paint
impl From<PaintScaleUniform> for Paint
Source§fn from(src: PaintScaleUniform) -> Paint
fn from(src: PaintScaleUniform) -> Paint
Source§impl From<PaintScaleUniformAroundCenter> for Paint
impl From<PaintScaleUniformAroundCenter> for Paint
Source§fn from(src: PaintScaleUniformAroundCenter) -> Paint
fn from(src: PaintScaleUniformAroundCenter) -> Paint
Source§impl From<PaintSkewAroundCenter> for Paint
impl From<PaintSkewAroundCenter> for Paint
Source§fn from(src: PaintSkewAroundCenter) -> Paint
fn from(src: PaintSkewAroundCenter) -> Paint
Source§impl From<PaintSolid> for Paint
impl From<PaintSolid> for Paint
Source§fn from(src: PaintSolid) -> Paint
fn from(src: PaintSolid) -> Paint
Source§impl From<PaintSweepGradient> for Paint
impl From<PaintSweepGradient> for Paint
Source§fn from(src: PaintSweepGradient) -> Paint
fn from(src: PaintSweepGradient) -> Paint
Source§impl From<PaintTransform> for Paint
impl From<PaintTransform> for Paint
Source§fn from(src: PaintTransform) -> Paint
fn from(src: PaintTransform) -> Paint
Source§impl From<PaintTranslate> for Paint
impl From<PaintTranslate> for Paint
Source§fn from(src: PaintTranslate) -> Paint
fn from(src: PaintTranslate) -> Paint
Source§impl From<PaintVarLinearGradient> for Paint
impl From<PaintVarLinearGradient> for Paint
Source§fn from(src: PaintVarLinearGradient) -> Paint
fn from(src: PaintVarLinearGradient) -> Paint
Source§impl From<PaintVarRadialGradient> for Paint
impl From<PaintVarRadialGradient> for Paint
Source§fn from(src: PaintVarRadialGradient) -> Paint
fn from(src: PaintVarRadialGradient) -> Paint
Source§impl From<PaintVarRotate> for Paint
impl From<PaintVarRotate> for Paint
Source§fn from(src: PaintVarRotate) -> Paint
fn from(src: PaintVarRotate) -> Paint
Source§impl From<PaintVarRotateAroundCenter> for Paint
impl From<PaintVarRotateAroundCenter> for Paint
Source§fn from(src: PaintVarRotateAroundCenter) -> Paint
fn from(src: PaintVarRotateAroundCenter) -> Paint
Source§impl From<PaintVarScale> for Paint
impl From<PaintVarScale> for Paint
Source§fn from(src: PaintVarScale) -> Paint
fn from(src: PaintVarScale) -> Paint
Source§impl From<PaintVarScaleAroundCenter> for Paint
impl From<PaintVarScaleAroundCenter> for Paint
Source§fn from(src: PaintVarScaleAroundCenter) -> Paint
fn from(src: PaintVarScaleAroundCenter) -> Paint
Source§impl From<PaintVarScaleUniform> for Paint
impl From<PaintVarScaleUniform> for Paint
Source§fn from(src: PaintVarScaleUniform) -> Paint
fn from(src: PaintVarScaleUniform) -> Paint
Source§impl From<PaintVarScaleUniformAroundCenter> for Paint
impl From<PaintVarScaleUniformAroundCenter> for Paint
Source§fn from(src: PaintVarScaleUniformAroundCenter) -> Paint
fn from(src: PaintVarScaleUniformAroundCenter) -> Paint
Source§impl From<PaintVarSkew> for Paint
impl From<PaintVarSkew> for Paint
Source§fn from(src: PaintVarSkew) -> Paint
fn from(src: PaintVarSkew) -> Paint
Source§impl From<PaintVarSkewAroundCenter> for Paint
impl From<PaintVarSkewAroundCenter> for Paint
Source§fn from(src: PaintVarSkewAroundCenter) -> Paint
fn from(src: PaintVarSkewAroundCenter) -> Paint
Source§impl From<PaintVarSolid> for Paint
impl From<PaintVarSolid> for Paint
Source§fn from(src: PaintVarSolid) -> Paint
fn from(src: PaintVarSolid) -> Paint
Source§impl From<PaintVarSweepGradient> for Paint
impl From<PaintVarSweepGradient> for Paint
Source§fn from(src: PaintVarSweepGradient) -> Paint
fn from(src: PaintVarSweepGradient) -> Paint
Source§impl From<PaintVarTransform> for Paint
impl From<PaintVarTransform> for Paint
Source§fn from(src: PaintVarTransform) -> Paint
fn from(src: PaintVarTransform) -> Paint
Source§impl From<PaintVarTranslate> for Paint
impl From<PaintVarTranslate> for Paint
Source§fn from(src: PaintVarTranslate) -> Paint
fn from(src: PaintVarTranslate) -> Paint
Source§impl FromObjRef<Paint<'_>> for Paint
impl FromObjRef<Paint<'_>> for Paint
Source§fn from_obj_ref(obj: &Paint<'_>, _: FontData<'_>) -> Self
fn from_obj_ref(obj: &Paint<'_>, _: FontData<'_>) -> Self
from
to an instance of Self
, using the provided data to resolve offsets.Source§impl FromTableRef<Paint<'_>> for Paint
impl FromTableRef<Paint<'_>> for Paint
fn from_table_ref(from: &T) -> Self
Source§impl Ord for Paint
impl Ord for Paint
Source§impl PartialOrd for Paint
impl PartialOrd for Paint
Source§impl Validate for Paint
impl Validate for Paint
Source§fn validate_impl(&self, ctx: &mut ValidationCtx)
fn validate_impl(&self, ctx: &mut ValidationCtx)
impl Eq for Paint
impl StructuralPartialEq for Paint
Auto Trait Implementations§
impl Freeze for Paint
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnwindSafe for Paint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T
, using the provided data to resolve any offsets.