Struct fyrox_ui::formatted_text::FormattedTextBuilder
source · pub struct FormattedTextBuilder { /* private fields */ }Implementations§
source§impl FormattedTextBuilder
impl FormattedTextBuilder
sourcepub fn new(font: SharedFont) -> FormattedTextBuilder
pub fn new(font: SharedFont) -> FormattedTextBuilder
Creates new formatted text builder with default parameters.
pub fn with_vertical_alignment( self, vertical_alignment: VerticalAlignment ) -> Self
pub fn with_wrap(self, wrap: WrapMode) -> Self
pub fn with_horizontal_alignment( self, horizontal_alignment: HorizontalAlignment ) -> Self
pub fn with_text(self, text: String) -> Self
pub fn with_constraint(self, constraint: Vector2<f32>) -> Self
pub fn with_brush(self, brush: Brush) -> Self
pub fn with_mask_char(self, mask_char: Option<char>) -> Self
sourcepub fn with_shadow(self, shadow: bool) -> Self
pub fn with_shadow(self, shadow: bool) -> Self
Whether the shadow enabled or not.
sourcepub fn with_shadow_brush(self, brush: Brush) -> Self
pub fn with_shadow_brush(self, brush: Brush) -> Self
Sets desired shadow brush. It will be used to render the shadow.
sourcepub fn with_shadow_dilation(self, thickness: f32) -> Self
pub fn with_shadow_dilation(self, thickness: f32) -> Self
Sets desired shadow dilation in units. Keep in mind that the dilation is absolute, not percentage-based.
sourcepub fn with_shadow_offset(self, offset: Vector2<f32>) -> Self
pub fn with_shadow_offset(self, offset: Vector2<f32>) -> Self
Sets desired shadow offset in units.
pub fn build(self) -> FormattedText
Auto Trait Implementations§
impl !RefUnwindSafe for FormattedTextBuilder
impl Send for FormattedTextBuilder
impl Sync for FormattedTextBuilder
impl Unpin for FormattedTextBuilder
impl !UnwindSafe for FormattedTextBuilder
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
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere T: 'static,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.