INNER CODE UNIT · Rust

to_pixel

elringus/sprite-dicing · crates/abi/src/lib.rs:164

fn to_pixel(c: &sd_pixel) -> Pixel {
    Pixel::new(c.r, c.g, c.b, c.a)
}

fn to_c_pixel(pixel: &Pixel) -> sd_pixel {
    sd_pixel {
        r: pixel.r(),
        g: pixel.g(),
        b: pixel.b(),
        a: pixel.a(),
    }
}

fn to_pivot(c: &sd_pivot) -> Pivot {
    Pivot::new(c.x, c.y)
}

fn to_c_pivot(pivot: &Pivot) -> sd_pivot {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…