pub struct DrawOptions {
pub ppem: Option<f32>,
pub contour_start: PathContourStart,
}Expand description
How an outline is drawn.
A glyf outline is scaled in 26.6 fixed point. Without
a size, it is drawn in font units, with an implied on-curve point between
two off-curve points keeping its half unit.
The variation location comes from the font. Hinting is done through the source’s own types.
Fields§
§ppem: Option<f32>Pixels per em to draw at, or None for font units.
contour_start: PathContourStartWhere a glyf contour starts when its first point is off-curve.
Implementations§
Source§impl DrawOptions
impl DrawOptions
Sourcepub fn new() -> DrawOptions
pub fn new() -> DrawOptions
Creates options that draw in font units with the default contour start.
Sourcepub fn with_ppem(self, ppem: Option<f32>) -> DrawOptions
pub fn with_ppem(self, ppem: Option<f32>) -> DrawOptions
Sets the size in pixels per em, or None for font units.
Sourcepub fn with_contour_start(self, contour_start: PathContourStart) -> DrawOptions
pub fn with_contour_start(self, contour_start: PathContourStart) -> DrawOptions
Sets where a glyf contour starts when its first point is off-curve.
Trait Implementations§
Source§impl Clone for DrawOptions
impl Clone for DrawOptions
Source§fn clone(&self) -> DrawOptions
fn clone(&self) -> DrawOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DrawOptions
Source§impl Debug for DrawOptions
impl Debug for DrawOptions
Source§impl Default for DrawOptions
impl Default for DrawOptions
Source§fn default() -> DrawOptions
fn default() -> DrawOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for DrawOptions
impl PartialEq for DrawOptions
impl StructuralPartialEq for DrawOptions
Auto Trait Implementations§
impl Freeze for DrawOptions
impl RefUnwindSafe for DrawOptions
impl Send for DrawOptions
impl Sync for DrawOptions
impl Unpin for DrawOptions
impl UnsafeUnpin for DrawOptions
impl UnwindSafe for DrawOptions
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