[−][src]Enum glyph_brush_layout::Layout
Built-in GlyphPositioner
implementations.
Takes generic LineBreaker
to indicate the wrapping style.
See BuiltInLineBreaker
.
Example
let layout = Layout::default().h_align(HorizontalAlign::Right);
Variants
Renders a single line from left-to-right according to the inner alignment. Hard breaking will end the line, partially hitting the width bound will end the line.
Fields of SingleLine
Renders multiple lines from left-to-right according to the inner alignment. Hard breaking characters will cause advancement to another line. A characters hitting the width bound will also cause another line to start.
Fields of Wrap
Methods
impl Layout<BuiltInLineBreaker>
[src]
pub fn default_single_line() -> Self
[src]
pub fn default_wrap() -> Self
[src]
impl<L: LineBreaker> Layout<L>
[src]
pub fn h_align(self, h_align: HorizontalAlign) -> Self
[src]
Returns an identical Layout
but with the input h_align
pub fn v_align(self, v_align: VerticalAlign) -> Self
[src]
Returns an identical Layout
but with the input v_align
pub fn line_breaker<L2: LineBreaker>(self, line_breaker: L2) -> Layout<L2>
[src]
Returns an identical Layout
but with the input line_breaker
Trait Implementations
impl<L: LineBreaker> GlyphPositioner for Layout<L>
[src]
fn calculate_glyphs<'font, F: FontMap<'font>>(
&self,
font_map: &F,
geometry: &SectionGeometry,
sections: &[SectionText]
) -> Vec<(PositionedGlyph<'font>, Color, FontId)>
[src]
&self,
font_map: &F,
geometry: &SectionGeometry,
sections: &[SectionText]
) -> Vec<(PositionedGlyph<'font>, Color, FontId)>
fn bounds_rect(&self, geometry: &SectionGeometry) -> Rect<f32>
[src]
fn recalculate_glyphs<'font, F>(
&self,
previous: Cow<Vec<(PositionedGlyph<'font>, Color, FontId)>>,
change: GlyphChange,
fonts: &F,
geometry: &SectionGeometry,
sections: &[SectionText]
) -> Vec<(PositionedGlyph<'font>, Color, FontId)> where
F: FontMap<'font>,
[src]
&self,
previous: Cow<Vec<(PositionedGlyph<'font>, Color, FontId)>>,
change: GlyphChange,
fonts: &F,
geometry: &SectionGeometry,
sections: &[SectionText]
) -> Vec<(PositionedGlyph<'font>, Color, FontId)> where
F: FontMap<'font>,
impl<L: Eq + LineBreaker> Eq for Layout<L>
[src]
impl Default for Layout<BuiltInLineBreaker>
[src]
impl<L: Clone + LineBreaker> Clone for Layout<L>
[src]
impl<L: PartialEq + LineBreaker> PartialEq<Layout<L>> for Layout<L>
[src]
impl<L: Copy + LineBreaker> Copy for Layout<L>
[src]
impl<L: Hash + LineBreaker> Hash for Layout<L>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<L: Debug + LineBreaker> Debug for Layout<L>
[src]
Auto Trait Implementations
impl<L> Sync for Layout<L> where
L: Sync,
L: Sync,
impl<L> Send for Layout<L> where
L: Send,
L: Send,
impl<L> Unpin for Layout<L> where
L: Unpin,
L: Unpin,
impl<L> UnwindSafe for Layout<L> where
L: UnwindSafe,
L: UnwindSafe,
impl<L> RefUnwindSafe for Layout<L> where
L: RefUnwindSafe,
L: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
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,