GNOME Bugzilla – Bug 521433
Heal tool doesn't respect the brush mask
Last modified: 2008-10-30 20:10:59 UTC
When using the heal tool I've noticed that even the area outside of the brush outline gets modified. I don't think this should happen. If it is intended, it should show another outline besides the brush that tells you what area might be impacted by the use of the tool. Thank you
Only the heal tool? If this is what I think it is, it would also apply to paintbrush, clone, and other paint tools. IIRC 2.4.x smooth the brush before generating an outline. This generally means that the outline is less complex, and can be slightly smaller than the outline shown. In any case, the outline only shows where the most paint will be applied. Which is to say, the outline is based on a 50% threshold, not a 1% threshold.
Exactly, just like the selection outline.
This has already been fixed in trunk. In the 2.4 code, the healing tool operates on the full rectangle that contains the brush, not just on the masked part. This is of course wrong, but I didn't backport the fix because it was rather complex for the stable branch, and the difference is generally pretty subtle. This is a genuine bug in 2.4, so it is wrong to resolve it as INVALID. The two correct options are either to backport the fix, or to resolve it as WONTFIX.
If that is the case, then this needs to be fixed in the stable branch as well. I don't quite understand why this didn't happen in the first place. Bill, please attach your patch here for review.
I am attaching the diff below, generated using viewcv. As you can see, it is rather complex, and I was concerned that it might break something. The whole point of the healing tool is to make changes that blend smoothly at the edges, so it takes a user with keen eyes to see that the edges aren't quite where they ought to be -- that's why I thought backporting it to the stable branch probably wasn't worth the risk at the time.
Created attachment 107070 [details] [review] patch for gimpheal.c, from rev 24324 of trunk This patch also includes some code cleanup, and contains a bit of debugging code that is still present in trunk.
I think this can go in without the debug code and without the unneeded definition of the GimpBrushCore variable (it's only used once, as far as I can see). If possible, the same changes should be done in trunk then.
2008-03-30 Sven Neumann <sven@gimp.org> Merged Bill's changes for bug #521433 from trunk with some minor cleanups: * app/paint/gimpbrushcore.[ch]: made gimp_brush_core_get_brush_mask() public. * app/paint/gimpheal.c: respect the brush mask.