Skip to main content

sprite_sample

Function sprite_sample 

Source
pub fn sprite_sample(
    sheet: &SpriteSheet,
    ox: i32,
    oy: i32,
    n: i32,
    px: i32,
    py: i32,
) -> u8
Expand description

Pixel (px, py) of the sprite at sheet pixel (ox, oy) drawn n pixels a side, n being 8 or a half of it. Each sample comes from the middle of the block it stands for rather than its corner — at one pixel a sprite that is the difference between showing the art and showing its margin.