foxnne / pixi

Pixel art editor made with Zig.
https://foxnne.github.io/pixi/
MIT License
738 stars 23 forks source link

Bucket tool changes colors across entire image, not just the selected sprite #23

Closed VisenDev closed 2 months ago

VisenDev commented 1 year ago

When using the bucket tool, it affects the entire image, not just the chosen sprite. I'm not sure if this is intentional behavior or not

foxnne commented 1 year ago

Thanks for the issue! Yes, I had quickly added the bucket tool for myself to use to swap colors for a project I was trying to complete. The bucket tool should be confined to a single tile, but it does change all of the selected color. I need to develop a fill algorithm and get that working so the tool is functional.

foxnne commented 2 months ago

@tnothy 's PR fixes this, I also added an enhancement to contiguous fill on click, and on ctrl/cmd + click replaces all occurrences of a color in a sprite.