HaikuArchives / ArtPaint

ArtPaint is a painting and image processing program.
https://haikuarchives.github.io/ArtPaint/
29 stars 18 forks source link

Selection: store selection map for undo/redo instead of polygonal data #609

Closed dsizzle closed 10 months ago

dsizzle commented 10 months ago

Another in the chain of selection changes... this change is what I needed for #597, but I ran into the other issues along the way so I had to fix them first.

Anyway, what this change does is store the selection bitmap for undo and redo operations. Previously the selection outlines were stored, not the bitmaps. Using the bitmaps means we can store the grayscale (aka alpha) values for selections instead of just the shapes. When blurred or painted selections are available, this will be critical.

It'll use more memory but it's needed for more interesting functionality.

I was also secretly hoping this might fix #608 and it seems to?

dsizzle commented 10 months ago

Oh I should mention this is another of those changes that should have no visible effect, just need to make sure all selections and manipulations and undo/redo still work properly

korli commented 10 months ago

@dsizzle any ideas why the checks fail with "ColorUtilities.h: No such file or directory"?

dsizzle commented 10 months ago

@korli I'm not sure. I’ve only seen that if I rollback git history and don’t do a clean build. I assume the auto build always starts clean, no?

korli commented 10 months ago

@korli I'm not sure. I’ve only seen that if I rollback git history and don’t do a clean build. I assume the auto build always starts clean, no?

Right. It seems it started with 5c75fafbba5b037ac41991b18a9071e58e5dfdc7

korli commented 10 months ago

@korli I'm not sure. I’ve only seen that if I rollback git history and don’t do a clean build. I assume the auto build always starts clean, no?

Right. It seems it started with 5c75faf

@dsizzle Looks fixed now.

humdingerb commented 10 months ago

I was also secretly hoping this might fix https://github.com/HaikuArchives/ArtPaint/issues/608 and it seems to?

Looks like it. No obvious selection/undo regression AFAICS.

dsizzle commented 10 months ago

I was also secretly hoping this might fix https://github.com/HaikuArchives/ArtPaint/issues/608 and it seems to?

Looks like it. No obvious selection/undo regression AFAICS.

Excellent, thanks for testing - then I shall merge

dsizzle commented 10 months ago

@korli Thanks for fixing the missing include paths for all the addons!