[−][src]Struct rs_tiled_json::object::Text
Text is an oject that contains all kinds of characteristics of text that Tiled is able to display, including the string itself.
Fields
text: String
bold: bool
italic: bool
strikeout: bool
underline: bool
kerning: bool
wrap: bool
pixelsize: u16
color: Color
fontfamily: String
halign: HAlign
valign: VAlign
Methods
impl Text
[src]
pub fn text(&self) -> &String
[src]
Get the string of text needing displayed.
pub fn is_bold(&self) -> bool
[src]
Is the text supposed to be bold?
pub fn is_italic(&self) -> bool
[src]
Is the text supposed to be italic?
pub fn is_strikeout(&self) -> bool
[src]
Does the text have a striekout?
pub fn is_underline(&self) -> bool
[src]
Is the text supposed to be underlined?
pub fn is_kerning(&self) -> bool
[src]
Does the text use kerning for display?
pub fn is_wrap(&self) -> bool
[src]
Does the text wrap around? If it does, the containing Object structure probably contains more relevant information for wrapping.
pub fn pixel_size(&self) -> u16
[src]
Discribe the size in pixels of the text.
pub fn color(&self) -> Color
[src]
Retrieve the color the text is supposed to be.
pub fn font_family(&self) -> &String
[src]
Get the font-family of the text.
pub fn horizontal_alignment(&self) -> HAlign
[src]
Get the horizontal alignment in the form of an HAlign enum. You can call to_string() on the enum if necessary.
pub fn halign_as_string(&self) -> String
[src]
Get the horizontal alignment of the text as a string.
pub fn vertical_alignment(&self) -> VAlign
[src]
Get the vertical alignment in the form of a VAlign enum. You can call to_string() on the enum if necessary.
pub fn valign_as_string(&self) -> String
[src]
Get the vertical alignment of the text as a string.
Trait Implementations
impl Clone for Text
[src]
impl Debug for Text
[src]
impl<'de> Deserialize<'de> for Text
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,