pub struct SceneTextBlock {
pub layout: TextBox,
pub color: Color,
pub font_weight: u16,
}Expand description
Font-aware multiline text that resolves into ordinary baseline Text nodes.
Fields§
§layout: TextBox§color: Color§font_weight: u16Implementations§
Source§impl SceneTextBlock
impl SceneTextBlock
pub fn new( text: impl Into<String>, x: f32, y: f32, width: f32, height: f32, font_size: f32, ) -> SceneTextBlock
pub fn with_min_font_size(self, min_font_size: f32) -> SceneTextBlock
pub fn with_line_height(self, line_height: f32) -> SceneTextBlock
pub fn with_max_lines(self, max_lines: usize) -> SceneTextBlock
pub fn with_alignment( self, horizontal: TextHorizontalAlign, vertical: TextVerticalAlign, ) -> SceneTextBlock
pub fn with_overflow(self, overflow: TextOverflow) -> SceneTextBlock
pub fn with_font_sources( self, sources: impl IntoIterator<Item = String>, ) -> SceneTextBlock
pub fn with_color(self, color: Color) -> SceneTextBlock
pub fn with_font_weight(self, font_weight: u16) -> SceneTextBlock
Trait Implementations§
Source§impl Clone for SceneTextBlock
impl Clone for SceneTextBlock
Source§fn clone(&self) -> SceneTextBlock
fn clone(&self) -> SceneTextBlock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SceneTextBlock
impl Debug for SceneTextBlock
Source§impl PartialEq for SceneTextBlock
impl PartialEq for SceneTextBlock
Source§impl SceneEmitter for SceneTextBlock
impl SceneEmitter for SceneTextBlock
fn emit( &self, context: SceneFrameContext, _props: &Value, scene: &mut Scene, ) -> Result<(), CompositionError>
impl StructuralPartialEq for SceneTextBlock
Auto Trait Implementations§
impl Freeze for SceneTextBlock
impl RefUnwindSafe for SceneTextBlock
impl Send for SceneTextBlock
impl Sync for SceneTextBlock
impl Unpin for SceneTextBlock
impl UnsafeUnpin for SceneTextBlock
impl UnwindSafe for SceneTextBlock
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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