Struct rusty_spine::SlotData
source · pub struct SlotData { /* private fields */ }
Expand description
Static slot data imported from Spine.
Implementations§
source§impl SlotData
impl SlotData
pub fn set_attachment_name(&mut self, attachment_name: &str)
sourcepub fn index(&self) -> usize
pub fn index(&self) -> usize
The index of the slot in Skeleton::slots
.
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The name of the slot, which is unique across all slots in the skeleton.
sourcepub fn attachment_name(&self) -> Option<&str>
pub fn attachment_name(&self) -> Option<&str>
The name of the attachment that is visible for this slot in the setup pose, or None
if no attachment is visible.
sourcepub fn color(&self) -> Color
pub fn color(&self) -> Color
The color used to tint the slot’s attachment. If dark_color
is
set, this is used as the light color for two color tinting.
sourcepub fn dark_color(&self) -> Option<Color>
pub fn dark_color(&self) -> Option<Color>
The dark color used to tint the slot’s attachment for two color tinting, or None
if
two color tinting is not used. The dark color’s alpha is not used.
sourcepub fn blend_mode(&self) -> BlendMode
pub fn blend_mode(&self) -> BlendMode
The blend mode for drawing the slot’s attachment.
sourcepub const fn c_ptr(&self) -> *mut spSlotData
pub const fn c_ptr(&self) -> *mut spSlotData
Get a pointer to the underlying spine-c
type.
Trait Implementations§
source§impl NewFromPtr<spSlotData> for SlotData
impl NewFromPtr<spSlotData> for SlotData
unsafe fn new_from_ptr(c_slot_data: *mut spSlotData) -> Self
Auto Trait Implementations§
impl Freeze for SlotData
impl RefUnwindSafe for SlotData
impl Send for SlotData
impl Sync for SlotData
impl Unpin for SlotData
impl UnwindSafe for SlotData
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