pub enum ShapeError {
SingularAffine {
determinant: f32,
},
UnbalancedPop {
depth: usize,
},
InvalidSize {
width: u32,
height: u32,
},
InvalidScale {
scale: f32,
},
UnknownGlyph {
glyph: u32,
glyph_count: usize,
},
NonFiniteCoordinate {
axis: &'static str,
},
RasterTooLarge {
pixels: usize,
limit: usize,
},
DegenerateUnitsPerEm,
}Expand description
The single crate-level error for rasterization and measurement.
Variants§
SingularAffine
The affine transform’s linear part is singular, so it has no inverse and collapses the plane.
UnbalancedPop
A transform stack was popped when empty. PathBuilder::pop_transform
returns this instead of quietly returning the identity, which would
silently drop a transform.
InvalidSize
A size argument was zero, negative, or otherwise outside the usable range for a raster of this dimension.
InvalidScale
A scale factor was zero, negative, NaN, or infinite.
UnknownGlyph
A glyph id beyond the font’s store was requested.
Fields
NonFiniteCoordinate
A coordinate was NaN or infinite where a finite one was required.
RasterTooLarge
The raster is too large to allocate: width × height exceeded the
element cap, so the mask would be gigabytes.
DegenerateUnitsPerEm
A font’s units_per_em was zero, which would make the scale factor
infinite.
Trait Implementations§
Source§impl Clone for ShapeError
impl Clone for ShapeError
Source§impl Debug for ShapeError
impl Debug for ShapeError
Source§impl Display for ShapeError
impl Display for ShapeError
Source§impl From<Affine2D> for ShapeError
impl From<Affine2D> for ShapeError
Source§impl From<ParseFloatError> for ShapeError
impl From<ParseFloatError> for ShapeError
Source§fn from(_e: ParseFloatError) -> Self
fn from(_e: ParseFloatError) -> Self
A string that was meant to be a scale did not parse.