Struct rusty_spine::TextureRegion

source ·
pub struct TextureRegion { /* private fields */ }
Expand description

A region of a texture, usually imported from an AtlasRegion.

Implementations§

source§

impl TextureRegion

source

pub fn u(&self) -> f32

source

pub fn v(&self) -> f32

source

pub fn u2(&self) -> f32

source

pub fn v2(&self) -> f32

source

pub fn degrees(&self) -> i32

source

pub fn offset_x(&self) -> f32

source

pub fn offset_y(&self) -> f32

source

pub fn width(&self) -> i32

source

pub fn height(&self) -> i32

source

pub fn original_width(&self) -> i32

source

pub fn original_height(&self) -> i32

source

pub fn renderer_object(&self) -> RendererObject<'_>

source

pub const fn c_ptr(&self) -> *mut spTextureRegion

Get a pointer to the underlying spine-c type.

source§

impl TextureRegion

Functions available if using the mint feature.

source

pub fn uvs(&self) -> (Vector2<f32>, Vector2<f32>)

source

pub fn offset(&self) -> Vector2<f32>

source

pub fn size(&self) -> Vector2<i32>

source

pub fn original_size(&self) -> Vector2<i32>

Trait Implementations§

source§

impl Debug for TextureRegion

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl NewFromPtr<spTextureRegion> for TextureRegion

source§

unsafe fn new_from_ptr(c_texture_region: *mut spTextureRegion) -> Self

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.