pub struct HaTextInstance { /* private fields */ }
Implementations§
source§impl HaTextInstance
impl HaTextInstance
pub fn lines_count(&self) -> usize
pub fn glyphs_count(&self) -> usize
pub fn elements_count(&self) -> usize
pub fn iter(&self) -> HaTextElementIter<'_> ⓘ
pub fn font(&self) -> &str
pub fn set_font(&mut self, font: impl ToString)
pub fn content(&self) -> &HaTextContent
pub fn fragments(&self) -> &[HaTextFragment]
pub fn set_content(&mut self, content: impl Into<HaTextContent>)
pub fn change_frequency(&self) -> HaChangeFrequency
pub fn set_change_frequency(&mut self, frequency: HaChangeFrequency)
pub fn color(&self) -> Rgba
pub fn set_color(&mut self, color: Rgba)
pub fn thickness(&self) -> Scalar
pub fn set_thickness(&mut self, thickness: Scalar)
pub fn cursive(&self) -> Scalar
pub fn set_cursive(&mut self, cursive: Scalar)
pub fn size(&self) -> Scalar
pub fn set_size(&mut self, size: Scalar)
pub fn alignment(&self) -> Vec2
pub fn set_alignment(&mut self, alignment: Vec2)
pub fn pivot(&self) -> Vec2
pub fn set_pivot(&mut self, pivot: Vec2)
pub fn bounds_width(&self) -> Option<Scalar>
pub fn set_bounds_width(&mut self, bounds_width: Option<Scalar>)
pub fn bounds_height(&self) -> Option<Scalar>
pub fn set_bounds_height(&mut self, bounds_height: Option<Scalar>)
pub fn wrapping(&self) -> &HaTextWrapping
pub fn set_wrapping(&mut self, wrapping: HaTextWrapping)
pub fn lines_extra_space(&self) -> Scalar
pub fn set_lines_extra_space(&mut self, lines_extra_space: Scalar)
pub fn mark_dirty(&mut self)
Trait Implementations§
source§impl Clone for HaTextInstance
impl Clone for HaTextInstance
source§fn clone(&self) -> HaTextInstance
fn clone(&self) -> HaTextInstance
Returns a copy of the value. Read more
1.0.0 · 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 HaTextInstance
impl Debug for HaTextInstance
source§impl Default for HaTextInstance
impl Default for HaTextInstance
source§impl<'de> Deserialize<'de> for HaTextInstance
impl<'de> Deserialize<'de> for HaTextInstance
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Prefab for HaTextInstance
impl Prefab for HaTextInstance
fn post_from_prefab(&mut self)
fn from_prefab(data: &Value) -> Result<Self, PrefabError>
fn from_prefab_with_extras( data: &Value, _named_entities: &HashMap<String, Entity, RandomState>, _state_token: ID<PhantomData<dyn State + Sync + Send>> ) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<Value, PrefabError>
fn from_prefab_str(data: &str) -> Result<Self, PrefabError>
fn to_prefab_string(&self) -> Result<String, PrefabError>
source§impl Serialize for HaTextInstance
impl Serialize for HaTextInstance
impl PrefabComponent for HaTextInstance
Auto Trait Implementations§
impl RefUnwindSafe for HaTextInstance
impl Send for HaTextInstance
impl Sync for HaTextInstance
impl Unpin for HaTextInstance
impl UnwindSafe for HaTextInstance
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<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more