Commit Graph

13 Commits

Author SHA1 Message Date
Jehan 02fa354254 app: replace more gimp_(s|g)et_active_layer() to *_selected_layers(). 2021-02-22 00:00:47 +01:00
Jehan 892fbafdf8 app: some more gimp_image_get_active_drawable() removed.
No logics changed. These are places where we expect single layer
selected.
2020-08-02 01:10:13 +02:00
Jehan bcacf6e2ae app: "active item" concept => "selected items".
After much thought, tests and discussions with Aryeom, we decided adding
back an active item concept additionally to the selected items ones is a
bad idea as it makes only usage unecessarily complex.
We will just have selected layers. Some kind of operations will work
when more than one item (layers, channels, vectors) are selected while
others will require exacty one item.

In particular, let's replace instances of gimp_image_(s|g)et_active_*()
by corresponding gimp_image_(s|g)et_selected_*(). Also replace single
item in various undo classes by GList of items.
Also "active-*-changed" GimpImage signals are no more, fully replaced by
"selected-*s-changed".

This is still work-in-progress.
2020-05-17 18:32:16 +02:00
Ell 1f81c31405 app: add gimp_drawable_filter_set_add_alpha()
Add an optional "format" parameter to gimp_drawable_merge_filter(),
which specifies the format to use for the output, possibly changing
the drawable's format.

In GimpDrawableFilter, add a gimp_drawable_filter_set_add_alpha()
function, which allows the filter to add an alpha channel to the
drawable when committed (by passing an appropriate format to
gimp_drawable_merge_filter()).
2020-01-16 00:23:52 +02:00
Ell 64b979c2f3 Issue #2837 - Floating selection is clipped to base layer
When attaching a floating selection to a layer, don't clip the
floating selection to the layer's boundary, and instead resize the
layer to include the entire floating selection when it's anchored.
As per the last commit, this can be prevented by locking the
layer's position.
2019-10-02 18:20:50 +03:00
Ell 89a9cf7e49 app: add "clip" parameter to gimp_drawable_merge_filter()
Add a new "clip" parameter to gimp_drawable_merge_filter().  When
set to FALSE, the function resizes the drawable to the bounding box
of the filter's output, instead of clipping the output to the
drawable's boundary.
2019-08-02 00:40:01 +03:00
Ell d928a80b7f app: avoid unnecessarily updating drawable after merging filter
In gimp_drawable_merge_filter(), add an "update" parameter, which
specifies whether to update the affected region of the drawable
after applying the filter.  Avoid updating the drawable when
commiting a GimpDrawableFilter (and manually update the drawable if
filter application was cancelled), and when anchoring a floating
selection, since in both cases the relevant region of the drawable
has already been updated.
2019-06-01 13:29:00 -04:00
Ell 3f45e893bf app: cache result of floating selections
Use an output cache for floating-selection filters, to speed up
anchoring.
2018-12-28 03:55:35 -05:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer bba8f69594 Revert "Bug 791512 - make the selection boundary detection the same as 2.8"
This commit was fixing only a symptom of our channel/selection
problem, making it appear things were fine.

This reverts commit 27512d802b.
2018-04-10 00:26:01 +02:00
Thomas Manni 27512d802b Bug 791512 - make the selection boundary detection the same as 2.8
Replace the GIMP_BOUNDARY_HALF_WAY macro by two others : one for perceptual and
one for linear gamma.

Use the GIMP_BOUNDARY_HALF_WAY_LINEAR to compute channels and floating selection
boundaries.
2017-12-18 21:01:30 +01:00
Jehan 84ee79c71d app: clean out many tabs under app/core/. 2016-11-25 05:51:03 +01:00
Michael Natterer 2ef8719cbe app: rename more stuff from "floating sel" to "floating selection" 2016-05-20 16:46:26 +02:00