Skip to main content

instance_rows

Function instance_rows 

Source
pub fn instance_rows(
    center: [f32; 2],
    size: [f32; 2],
    rotation: f32,
    anchor: [f32; 2],
    flip_x: bool,
    flip_y: bool,
) -> ([f32; 4], [f32; 4])
Expand description

Transform rows mapping quad corners (-0.5..0.5) to world coords, honoring size, rotation, anchor, and mirror. Matches the canvas path pixel-for-pixel at the default anchor: corner (-0.5,-0.5) lands on center - size / 2.