Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 448 Bytes

File metadata and controls

26 lines (23 loc) · 448 Bytes

pixpup

Rasterize your shapes on a bitmap.

Example

fn main() {
    let mut bitmap: Bitmap = Bitmap::new(48, 48);
    Line {
        start: Pos(1, 1),
        end: Pos(32, 16),
    }
    .rasterize(&mut bitmap);
    println!(
        "{}",
        PlainBitFormatter::new(
            "~>",
            "  ",
            || bitmap.bits().horizontal_bits(),
            bitmap.width(),
            bitmap.height()
        )
    )
}