Skip to main content

ActorFrameWithOrigin

Function ActorFrameWithOrigin 

Source
pub fn ActorFrameWithOrigin(
    center: [f32; 2],
    size: [f32; 2],
    geom: GeomHandle,
    mirror_x: bool,
    origin: [f32; 2],
    child: View,
) -> View
Expand description

Origin-aware ActorFrame: mirror_x flips about the normalized origin ([0, 1], e.g. an NT xorigin / w) instead of the surface center. Set origin from the catalog’s AnimDef::anchor when the surface content carries an off-center sprite origin.