Work in progress on visual feather control

From GIMP GUI Redesign
Revision as of 19:06, 11 June 2017 by Prokoudine (talk | contribs)
Jump to: navigation, search

Problem statement

Feathering is a great option that enables spreading an effect over the boundaries of a selection it's applied to with a "configurable" fall-off.

Currently GIMP allows adding feathering to a selection by taking user-contributed amount in pixels. However GIMP doesn't allow tweaking existing feathering value directly, nor does it provide any visual cue as to how far the feathering stretches. This increases the amount of trial-and-error during e.g. processing feathered selections with filters.

What should be available

It should be possible to visually tweak the amount of feathering on the canvas. Visual cue for feathering, however, should not get in the way of user's interaction with GIMP.

It should be possible to use numeric input for controlling the amount of feathering. Input field should be discoverable, but it should not get in the way of user's interaction with GIMP.

Design draft

Visual editing of the feathering amount

Initializing feathering

Let's stick to what we already have for now.

Visual cue

The visual cue should generally repeat the existing selection cue, honoring non-uniform feathering by expanding or contracting respective areas of the visual cue.

One possible rendering implementation is a thin dashed line.

TODO: visualization specifics.

Positioning controls

The visual cue should have at least one on-canvas control for expanding/contracting the feathered area.

TODO: supposing, a user sees only a part of a selection in the viewport. how many controls per feathered area should GIMP render? what would be the placement logic?

Possible solution: render one control for tweaking the whole feathered area proportionally, then one control per each non-uniformly feathered area so that they could be tweaked independently from uniform parts of the feathered area.

Interaction

Expanding and contracting the feathered area should be done by dragging an on-canvas control. Movement in the [0..180] degrees range would qualify for upwards movement and lead to expansion. Movement in the [180..360] degrees range would qualify for downwards movement and lead to contraction.

TODO: rotated canvas view? flipped view?

Numeric control over feathering

Discovering numeric input controls

The numeric input in the tools' options dockable dialog kinda works for creating a new selection. However, starting with 2.9/2.10 it would fail miserably as soon as the user opens a filter dialog, because the dockable dialog starts showing just the color picker radius control. Something needs to be done here.

Positioning of numeric controls

TODO

Interaction

TODO

Handling non-uniform feathering

Non-uniform feathering happens when one uses e.g. a quick mask and a brush of different size and/or hardness value. Here is how this should be handled:

  • Tweaking via visual controls would adjust the amount of feathering proportionally. It remains to be decided whether there should be a way to visually enforce a uniform value to a non-uniform feathering.
  • Tweaking via numeric input would change the amount proportionally when used with arithmetic operations (+20, *40 etc.), or change all feathering to a certain amount when absolute value is given by the user.

Removing feathering

TODO: 'Select -> Remove feathering' is a sensible menu command, however an on-canvas option could be designed.

Tentative design

darktable has feathered masks and calls it 'gradual decay' in the docs: https://www.darktable.org/usermanual/ch03s02s07.html.php