#[repr(C)]pub struct SsPlacement {
pub fit: u32,
pub align: u32,
pub frame: SsRect,
pub has_frame: bool,
pub offset_x: f32,
pub offset_y: f32,
pub scale: f32,
pub flip_x: bool,
pub flip_y: bool,
pub rotation: f32,
}Expand description
Everything ss_player_fit_into needs.
Zero-initialising this is not the default placement — it would ask for
scale 0, which draws nothing. Call ss_placement_default first and change
what you mean to change.
Fields§
§fit: u32One of the SS_FIT_* constants.
align: u32One of the SS_ALIGN_* constants.
frame: SsRectThe box to fit. Read only when has_frame is true; otherwise the
animation’s authored canvas is used (ss_player_canvas_rect).
has_frame: bool§offset_x: f32Pixels from the aligned position, applied after the fit.
offset_y: f32See offset_x.
scale: f32A multiplier on top of the fit’s scale, not a replacement for it.
flip_x: boolMirror horizontally. The alignment follows the flip.
flip_y: boolMirror vertically.
rotation: f32Passed through to the placement untouched; rotation has no part in the fit itself.
Trait Implementations§
Source§impl Clone for SsPlacement
impl Clone for SsPlacement
impl Copy for SsPlacement
Auto Trait Implementations§
impl Freeze for SsPlacement
impl RefUnwindSafe for SsPlacement
impl Send for SsPlacement
impl Sync for SsPlacement
impl Unpin for SsPlacement
impl UnsafeUnpin for SsPlacement
impl UnwindSafe for SsPlacement
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