Struct webgl2_glyph::glyph_brush::OwnedSection [−][src]
pub struct OwnedSection<X = Extra> {
pub screen_position: (f32, f32),
pub bounds: (f32, f32),
pub layout: Layout<BuiltInLineBreaker>,
pub text: Vec<OwnedText<X>, Global>,
}
Fields
screen_position: (f32, f32)
Position on screen to render text, in pixels from top-left. Defaults to (0, 0).
bounds: (f32, f32)
Max (width, height) bounds, in pixels from top-left. Defaults to unbounded.
layout: Layout<BuiltInLineBreaker>
Built in layout, can be overridden with custom layout logic
see queue_custom_layout
text: Vec<OwnedText<X>, Global>
Text to render, rendered next to one another according the layout.
Implementations
pub fn with_screen_position<P>(self, position: P) -> OwnedSection<X> where
P: Into<(f32, f32)>,
pub fn with_layout<L>(self, layout: L) -> OwnedSection<X> where
L: Into<Layout<BuiltInLineBreaker>>,
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<X> RefUnwindSafe for OwnedSection<X> where
X: RefUnwindSafe,
impl<X> Send for OwnedSection<X> where
X: Send,
impl<X> Sync for OwnedSection<X> where
X: Sync,
impl<X> Unpin for OwnedSection<X> where
X: Unpin,
impl<X> UnwindSafe for OwnedSection<X> where
X: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more