Skip to content

Feature suggestion: apply a closure to all the pixels of the map #8

@AdithyaLaakso

Description

@AdithyaLaakso

I frequently find myself writing code to work with bitmaps that looks like this:

    for x in 0..map.get_width {
        for y in 0..map.get_height {
            ...
            let _ = map.set_pixel(x, y, {function call]);
        }
    }

Some syntatic sugar for that in the form of

map.apply_to_pixels({|x, y| ...});

would be amazing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions