Per shape feathering and blur

Issue #86 resolved
Hombre created an issue

Obtaining the desired shape can be complex to obtain when you want different blur value on the size of your area. On improvement to better control that would be to allow per shape feathering and blur. This and the boolean attribute of the shape (add, subtract, intersect) can provide much more flexibility.

I’ve started a patch that seem to work fine, in rtengine at least, in my per-shape-feathering branch. Could you please test it ?

On the GUI side, you have a new button in the Mode buttons to toggle on/off per shape feathering. When toggles on, the 2 sliders (feathering and blur) control the shape’s value. When toggles off, it control the global value.

What’s still to be done, if the principle is agreed on :

  • find a better placement for the new toggle button, it might not be a good idea to have put in in the Mode section
  • move the 2 sliders in/out of the Area shapes frame, depending on the toggle button. The toggle button should always be above those sliders, to avoid having something else under the cursor after toggle
  • when toggling that button, the currently selected shape’s value (feather and blur) shouldn’t be transmitted to the global value, and vice versa

Any thought @agriggio ?

Comments (10)

  1. Hombre reporter

    @agriggio I don’t understand exactly when you click on the different buttons and then don’t really understand what happens on screen. But I see that committing was a bit prematurate, I also have problem on my side.

    Also, I don’t understand why local and global feathering have to be mutually exclusive..

    I thought that the feathering algorithm required data with either 0.0 or 1.0. If it can handle any values in this range, I can get ride of the toggle button but will have to add 2 sliders, which I heard you say you wasn't too keen on adding them.

    Please tell me what you prefer before I come back with something more usable.

  2. agriggio repo owner

    @Hombre the first issue is that if I enable per-shape feathering, then the sliders do not seem to do anything for me.

    I thought that the feathering algorithm required data with either 0.0 or 1.0.

    not at all, it’s just a guided filter.

    I can get ride of the toggle button but will have to add 2 sliders, which I heard you say you wasn't too keen on adding them.

    thinking about this, the best solution would be to have all the per-shape sliders disappear when the on-canvas editing is off. This way, we would avoid unnecessary clutter and still have all the controls when needed

  3. Hombre reporter

    Agreed on your best solution. I’ll rework my patch accordingly, with per shape and global feathering.

  4. Hombre reporter

    @agriggio I’ve update the per-shape-feathering branch, as requested. I hope it’s in a mergeable state now.

    Commit message is :

    Reworked per shape feather handling + various GUI optimizations

    • per shape and global feathering and blur are now simultaneously
      available

    • shape's sliders are hidden when not in edit mode

    • some shape icons are made unsensitive in some cases (e.g. when the
      shape list is empty or when the shape type is Polygon)

  5. agriggio repo owner

    tested, approved, merged, and pushed 🙂

    Thanks a lot!

    BTW, I had to change the per-shape “Blur” and “Feather” to “ShapeBlur” and “ShapeFeather” in procparams, to avoid clashes with the global settings. Other than that, everything worked fine.

  6. Log in to comment