Skip to main content

ss_player_canvas_rect

Function ss_player_canvas_rect 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_player_canvas_rect( handle: *mut SsPlayer, out: *mut SsRect, ) -> i32
Expand description

Write the authored canvas of the animation now playing into out, as a box in player-local units — what ss_player_fit_into fits when has_frame is false.

Returns SS_OK, or SS_ERROR_INVALID_ARGUMENT when the handle or out is null or no animation is set up — out is untouched in that case.

The box is the frame the artist composed in, placed against the origin by the animation’s pivot, not a measured bounding box: it costs nothing to read and does not change when the animation does.

§Safety

handle must be a live handle or null; out must point at a writable ss_rect_t.