pub struct Text {
pub color: Color,
pub font_id: u16,
pub font_size: u16,
pub letter_spacing: u16,
pub line_height: u16,
pub wrap_mode: TextElementConfigWrapMode,
}Fields§
§color: Color§font_id: u16Clay doesn’t manage font, it’s up to you to assign an id to each font you are using, and passing them to the font_id field
font_size: u16§letter_spacing: u16§line_height: u16§wrap_mode: TextElementConfigWrapModeImplementations§
Source§impl Text
impl Text
pub fn new() -> Self
pub fn color(&mut self, color: Color) -> &mut Self
pub fn font_id(&mut self, id: u16) -> &mut Self
pub fn font_size(&mut self, size: u16) -> &mut Self
pub fn letter_spacing(&mut self, spacing: u16) -> &mut Self
pub fn line_height(&mut self, height: u16) -> &mut Self
pub fn wrap_mode(&mut self, mode: TextElementConfigWrapMode) -> &mut Self
pub fn end(&self) -> TextElementConfig
Trait Implementations§
Source§impl From<Clay_TextElementConfig> for Text
impl From<Clay_TextElementConfig> for Text
Source§fn from(value: Clay_TextElementConfig) -> Self
fn from(value: Clay_TextElementConfig) -> Self
Converts to this type from the input type.
Source§impl From<Text> for Clay_TextElementConfig
impl From<Text> for Clay_TextElementConfig
impl Copy for Text
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
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