[−][src]Struct rs_tiled_json::object::Object
Means of describing nodes in objectgroup layers.
Fields
id: u32
x: f64
y: f64
gid: Option<u32>
name: String
otype: String
height: f64
width: f64
rotation: f64
visible: bool
ellipse: bool
point: bool
polygon: Option<Vec<Point>>
polyline: Option<Vec<Point>>
text: Option<Text>
properties: Vec<Property>
Methods
impl Object
[src]
pub fn id(&self) -> u32
[src]
Get the object id, unique across all objects.
pub fn x(&self) -> f64
[src]
Horizontal position.
pub fn y(&self) -> f64
[src]
Vertical position.
pub fn gid(&self) -> Option<u32>
[src]
Get object gid if it represents a tile.
pub fn name(&self) -> &String
[src]
Get the name of the object.
pub fn obj_type(&self) -> &String
[src]
Get the user-defined type of the object.
pub fn height(&self) -> f64
[src]
Height of the object
pub fn width(&self) -> f64
[src]
Width of the object.
pub fn rotation(&self) -> f64
[src]
Get the rotation of the object.
pub fn visible(&self) -> bool
[src]
Is the object visible in Tiled.
pub fn is_ellipse(&self) -> bool
[src]
Does the object describe an ellipse?
pub fn is_point(&self) -> bool
[src]
Does the object describe a point?
pub fn is_polygon(&self) -> bool
[src]
Does the object describe a polygon?
pub fn is_polyline(&self) -> bool
[src]
Does the object describe a polyline?
pub fn is_text(&self) -> bool
[src]
Does the object describe text?
pub fn polygon(&self) -> Option<&Vec<Point>>
[src]
Get a reference to the polygon vector of points.
pub fn polyline(&self) -> Option<&Vec<Point>>
[src]
Gets a reference of the polyline vector of points.
pub fn text(&self) -> Option<&Text>
[src]
Gets a reference to the Text data of the object.
Trait Implementations
impl Debug for Object
[src]
impl<'de> Deserialize<'de> for Object
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl HasProperty for Object
[src]
fn get_property_vector(&self) -> &Vec<Property>
[src]
Access properties of Objects.
fn get_property(&self, name: &str) -> Option<&Property>
[src]
fn get_property_value(&self, name: &str) -> Option<&PropertyValue>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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, 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>,