Struct rusty_spine::RegionAttachment
source · pub struct RegionAttachment { /* private fields */ }
Expand description
An attachment which draws a texture.
Implementations§
source§impl RegionAttachment
impl RegionAttachment
pub const fn new_from_ptr(c_region_attachment: *mut spRegionAttachment) -> Self
sourcepub unsafe fn compute_world_vertices(
&self,
slot: &Slot,
vertices: &mut [f32],
offset: i32,
stride: i32
)
pub unsafe fn compute_world_vertices( &self, slot: &Slot, vertices: &mut [f32], offset: i32, stride: i32 )
§Safety
The slot passed in must be the same slot this attachment originated from.
pub fn update_region(&mut self)
pub fn update_from_props(&mut self, props: &RegionProps)
pub fn name(&self) -> &str
pub fn attachment_type(&self) -> AttachmentType
pub fn path(&self) -> &str
sourcepub fn set_path(&mut self, value: String) -> Result<(), NulError>
pub fn set_path(&mut self, value: String) -> Result<(), NulError>
§Errors
Returns std::ffi::NulError
if an interior nul byte is found.
pub fn set_x(&mut self, value: f32)
pub fn set_y(&mut self, value: f32)
pub fn set_scale_x(&mut self, value: f32)
pub fn set_scale_y(&mut self, value: f32)
pub fn set_rotation(&mut self, value: f32)
pub fn set_width(&mut self, value: f32)
pub fn set_height(&mut self, value: f32)
pub fn color(&self) -> Color
pub fn color_mut(&mut self) -> &mut Color
pub fn uvs(&self) -> [c_float; 8]
pub fn offset(&self) -> [c_float; 8]
pub fn renderer_object(&self) -> RendererObject<'_>
pub fn region(&self) -> Option<CTmpRef<'_, Self, TextureRegion>>
pub fn region_mut(&mut self) -> Option<CTmpMut<'_, Self, TextureRegion>>
sourcepub const fn c_ptr(&self) -> *mut spRegionAttachment
pub const fn c_ptr(&self) -> *mut spRegionAttachment
Get a pointer to the underlying spine-c
type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegionAttachment
impl RefUnwindSafe for RegionAttachment
impl Send for RegionAttachment
impl Sync for RegionAttachment
impl Unpin for RegionAttachment
impl UnwindSafe for RegionAttachment
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