HaikuArchives / ArtPaint

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

Gradient fix #485

Closed dsizzle closed 1 year ago

dsizzle commented 1 year ago

Please merge #484 first, this patch depends on it.

But, I believe this fixes the gradient chaos. I can reproduce it pretty easily before this change, and afterward I can't seem to.

Fixes #353

humdingerb commented 1 year ago

Yay! Seems to work perfectly now! Well, as perfect as the slightly weird gradient application allows... :) (You noticed the merge conflict?)

BTW, I think we should remove the "Enable preview" option. Who wants to apply a gradient blindly?

dsizzle commented 1 year ago

Darn. I thought merging the other pr first would avoid a merge conflict. I’ll fix it this evening.

Re: enable preview, I’m also not sure what the flood fill option does. I can’t tell any difference. I thought one mode would be restricted only by selection and the other would be restricted by other pixels as well.

ie, if you draw a rectangle, and then click on the rectangle to fill, one mode fills the whole canvas and the other just fills just the rectangle. But I believe both flood the whole canvas at the moment (assuming no selection)

humdingerb commented 1 year ago

There's a difference. From the documentation:

Flood fill only colors objects that are connected, otherwise all similar pixels on the current layer get changed.

As an example, open the Walter logo and fill the "W" with Flood fill, then fill the "a" without Flood fill. Useful.

dsizzle commented 1 year ago

ok, fixed the merge conflict.

I also played with the different settings - I had Tolerance set to 100 so both options were filling the whole canvas!

I don't think I've ever used a fill that works this way, but I must say once I understand it, it's pretty darn cool how it works.

Like the flood + tolerance is like a fill version of the magic wand selection. And the non-flood + tolerance is like Photoshop's "Replace Color" tool. The fact that you can do this with basically one click is really fancy:

0waltgrad

humdingerb commented 1 year ago

Like the flood + tolerance is like a fill version of the magic wand selection. And the non-flood + tolerance is like Photoshop's "Replace Color" tool. The fact that you can do this with basically one click is really fancy:

It is rather nice! :) I think I'll put that as a further explanation into the documentation.