pub struct EpaintLayout {
typeface: FontChoice,
fonts: RefCell<Fonts>,
}Expand description
A standalone [Fonts] with the app’s faces installed — the very engine
that lays the diagram out on screen, driven without a Context.
Fields§
§typeface: FontChoice§fonts: RefCell<Fonts>Laying out needs &mut; the font atlas it fills along the way is
never read.
Implementations§
Source§impl EpaintLayout
impl EpaintLayout
Trait Implementations§
Source§impl TextLayout for EpaintLayout
impl TextLayout for EpaintLayout
Source§fn typeface(&self) -> FontChoice
fn typeface(&self) -> FontChoice
The typeface this engine lays text out in. The SVG export traces its
outlines from that face’s own bytes, so an engine that answered for a
different one would place one font’s glyphs at another’s pen positions.
Source§fn layout(&self, text: &str, font: &Font, wrap: WorldPx) -> Layout
fn layout(&self, text: &str, font: &Font, wrap: WorldPx) -> Layout
Lay
text out in font, word-wrapped at wrap
([WorldPx::UNBOUNDED] for an unwrapped run). An exporter’s engine
lays out at one pixel per point, so a resolution-independent format
inherits no display’s DPI; the screen’s lays out at the display’s, so
a mark recorded through it lands where the screen draws it.Auto Trait Implementations§
impl !Freeze for EpaintLayout
impl !RefUnwindSafe for EpaintLayout
impl Send for EpaintLayout
impl !Sync for EpaintLayout
impl Unpin for EpaintLayout
impl UnsafeUnpin for EpaintLayout
impl !UnwindSafe for EpaintLayout
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
§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>
Converts
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>
Converts
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