Struct DrawSettings
pub struct DrawSettings<'a> { /* private fields */ }Implementations§
§impl<'a> DrawSettings<'a>
impl<'a> DrawSettings<'a>
pub fn unhinted(
size: Size,
location: impl Into<LocationRef<'a>>,
) -> DrawSettings<'a>
pub fn unhinted( size: Size, location: impl Into<LocationRef<'a>>, ) -> DrawSettings<'a>
Creates settings for an unhinted draw operation with the given size and location in variation space.
pub fn hinted(
instance: &'a HintingInstance,
is_pedantic: bool,
) -> DrawSettings<'a>
pub fn hinted( instance: &'a HintingInstance, is_pedantic: bool, ) -> DrawSettings<'a>
Creates settings for a hinted draw operation using hinting data contained in the font.
If is_pedantic is true then any error that occurs during hinting will
cause drawing to fail. This is equivalent to the FT_LOAD_PEDANTIC flag
in FreeType.
The font size, location in variation space and hinting mode are defined by the current configuration of the given hinting instance.
pub fn with_memory(self, memory: Option<&'a mut [u8]>) -> DrawSettings<'a>
pub fn with_memory(self, memory: Option<&'a mut [u8]>) -> DrawSettings<'a>
Builder method to associate a user memory buffer to be used for temporary allocations during drawing.
The required size of this buffer can be computed using the
OutlineGlyph::draw_memory_size method.
If not provided, any necessary memory will be allocated internally.
pub fn with_path_style(self, path_style: PathStyle) -> DrawSettings<'a>
pub fn with_path_style(self, path_style: PathStyle) -> DrawSettings<'a>
Builder method to control nuances of glyf pointstream interpretation.
Meant for use when trying to match legacy code behavior in Rust.
Trait Implementations§
§impl<'a> From<&'a HintingInstance> for DrawSettings<'a>
impl<'a> From<&'a HintingInstance> for DrawSettings<'a>
§fn from(value: &'a HintingInstance) -> DrawSettings<'a>
fn from(value: &'a HintingInstance) -> DrawSettings<'a>
§impl<'a, L> From<(Size, L)> for DrawSettings<'a>where
L: Into<LocationRef<'a>>,
impl<'a, L> From<(Size, L)> for DrawSettings<'a>where
L: Into<LocationRef<'a>>,
§fn from(value: (Size, L)) -> DrawSettings<'a>
fn from(value: (Size, L)) -> DrawSettings<'a>
§impl From<Size> for DrawSettings<'_>
impl From<Size> for DrawSettings<'_>
§fn from(value: Size) -> DrawSettings<'_>
fn from(value: Size) -> DrawSettings<'_>
Auto Trait Implementations§
impl<'a> Freeze for DrawSettings<'a>
impl<'a> RefUnwindSafe for DrawSettings<'a>
impl<'a> Send for DrawSettings<'a>
impl<'a> Sync for DrawSettings<'a>
impl<'a> Unpin for DrawSettings<'a>
impl<'a> UnsafeUnpin for DrawSettings<'a>
impl<'a> !UnwindSafe for DrawSettings<'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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more