[−][src]Struct fit_text::Scribe
A struct for writing text into multiple rectangles
Fields
format: TextFormat
The text format
glyphs: &'a mut C
The character cache
transform: Matrix2d
The transform
graphics: &'a mut G
The graphics abstraction being drawn to
Methods
impl<'a, C, G> Scribe<'a, C, G>
[src]
pub fn new(
format: TextFormat,
glyphs: &'a mut C,
transform: Matrix2d,
graphics: &'a mut G
) -> Self
[src]
format: TextFormat,
glyphs: &'a mut C,
transform: Matrix2d,
graphics: &'a mut G
) -> Self
Create a new Scribe
impl<'a, C, G> Scribe<'a, C, G> where
C: CharacterCache,
G: Graphics<Texture = C::Texture>,
[src]
C: CharacterCache,
G: Graphics<Texture = C::Texture>,
pub fn write<S, R>(&mut self, text: S, rectangle: R) -> Result<(), C::Error> where
S: AsRef<str>,
R: Rectangle<Scalar = f64>,
[src]
S: AsRef<str>,
R: Rectangle<Scalar = f64>,
Write some text into a rectangle with the Scribe
pub fn write_colored<I, S, R>(
&mut self,
fragments: I,
rectangle: R
) -> Result<(), C::Error> where
I: IntoIterator<Item = (S, Color)>,
S: AsRef<str>,
R: Rectangle<Scalar = f64>,
[src]
&mut self,
fragments: I,
rectangle: R
) -> Result<(), C::Error> where
I: IntoIterator<Item = (S, Color)>,
S: AsRef<str>,
R: Rectangle<Scalar = f64>,
Write some colored text fragments into a rectangle with the Scribe
Auto Trait Implementations
impl<'a, C, G> Unpin for Scribe<'a, C, G>
impl<'a, C, G> Sync for Scribe<'a, C, G> where
C: Sync,
G: Sync,
C: Sync,
G: Sync,
impl<'a, C, G> Send for Scribe<'a, C, G> where
C: Send,
G: Send,
C: Send,
G: Send,
impl<'a, C, G> !UnwindSafe for Scribe<'a, C, G>
impl<'a, C, G> RefUnwindSafe for Scribe<'a, C, G> where
C: RefUnwindSafe,
G: RefUnwindSafe,
C: RefUnwindSafe,
G: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,