Commit Graph

43500 Commits

Author SHA1 Message Date
Ell
b3583041ac app: add GimpToolItem; derive GimpToolInfo from it
Add GimpToolItem as a common base class for toolbox items.
Derive GimpToolInfo from GimpToolItem, representing an individual
tool.  The next commits add support for tool groups, represented by
an alternative subclass of GimpToolItem.

Most of the tool-info properties remain in GimpToolInfo, however,
GimpToolItem takes care of tool-item visibility.
2020-01-30 02:46:52 +02:00
7c4c475597 Update Japanese translation 2020-01-29 09:14:00 +00:00
608c371dcf Update Japanese translation 2020-01-29 09:06:21 +00:00
8f109a08e0 Updated Italian translation 2020-01-29 09:18:27 +01:00
d061b1561b Updated Spanish Translation 2020-01-29 08:45:09 +01:00
2e1ff3583f Update Polish translation 2020-01-26 14:32:05 +01:00
ba52a9e988 Update Catalan translation 2020-01-25 20:31:15 +01:00
817e83bb27 app: Fix Mandala Symmetry Kaleidoscope mode - brush transform and stroke order
Changed the reflection method to find the middle of the slice the
user is drawing on, and reflecting on that. This reflects the slice
in place, making it easier to rotate it to the intended location.
This fix preserves the order the dabs are drawn on the
slices, to be counterclockwise.

Fixed the brush transform, by setting the reflect output variable,
and calculating accordingly.

(cherry picked from commit ed6517f094)
2020-01-22 01:17:30 +02:00
Ell
4f9c3f2a6a app: avoid deleting empty layer groups when downscaling image
When dowscaling an image (or a layer group), empty layer groups
can be discarded as a result of their new dimensions being too
small, since we're calculating their new dimensions according to
their fake 1x1 dimensions.  However, these dimensions are purely an
implementation detail and shouldn't affect the result, and neither
do we show a warning for them.

Instead, simply avoid discarding empty layer groups.

(cherry picked from commit b99a2631ef)
2020-01-21 20:16:02 +02:00
Ell
13bc82e0ff icons: replace symbolic gimp-visible icons again 2020-01-21 19:14:42 +02:00
Ell
68e4fcd9fc icons: replace symbolic gimp-visible icon (aka the eye icon)
It looked meh :)
2020-01-20 23:12:44 +02:00
Ell
e14b95820c app: restrict whole-drawable updates to groups with filters
Restrict last commit's workaround to layer groups only (which is
the only relevant case ATM), since it negatively impacts the warp
tool, which does rely on the ability to perform (accurate) partial
updates with filters to improve performance.  It's only a temporary
hack anyway.

(cherry picked from commit 18870975b8)
2020-01-20 00:38:19 +02:00
Ell
3b8f01282b app: always update full drawable region if it has filters
When a drawable has filters attached, they may influence the area
affected by drawable updates.  Currently, we ignore that, updating
the original region regardless.  This can lead to drawable updates
not affecting the correct regions.  This couldn't be triggered
until now, but since layer groups can now have a transform op
attached as a filter, updates to their sublayers -- which can
happen while the transform tool is active -- run into this problem.

Fix it for now by simply updating the full drawable region when the
drawable has filters.  This is a very conservative approach -- we
don't even bother checking if we're only dealing with point
filters, as this change only influences transformed groups right
now.  Ultimately, we need to rely on node invalidation to drive
updates, which takes this into account.

(cherry picked from commit 8be0e646bc)
2020-01-19 21:08:07 +02:00
Ell
79b3fb5ce7 app: don't emit GimpImage::linked-items-changed for non-attached items
In gimp_item_set_linked(), don't emit the
GimpImage::linked-items-changed signal if the item is not attached.

(cherry picked from commit 1e26ce8a60)
2020-01-19 21:08:06 +02:00
97a7a58138 Update Polish translation 2020-01-19 13:12:30 +01:00
Ell
6f68aa15b8 app: regenerate pdb/image-cmds.c 2020-01-18 16:01:11 +02:00
Ell
b09d272c5c app: add "Preview linked items" option to transform tools
Add a new "Preview linked items" option to the transform-grid
tools.  When this option is enabled, together with composited
previews, the transform preview includes all linked layers/channels
when transforming a layer/channel.  Note that paths aren't included
for now.

Ultimately, we'd probably want to cut down on the various preview
options and enable this by default, but let's make this optional
for now.

This commit also improves composited-preview clipping in some
cases.

(cherry picked from commit d24713349d)
2020-01-18 15:18:46 +02:00
Ell
fbcabeb99f app: add GimpImage::linked-items-changed signal
Add a new GimpImage::linked-items-changed signal, which is emitted
whenever the set of linked items in an image changes.

(cherry picked from commit 7d6737fe9a)
2020-01-18 15:18:46 +02:00
Ell
7b4fba243e app: suspend tile validation while setting extent of validate-handler buffer
In gimp_tile_handler_validate_buffer_set_extent(), suspend tile
validation while calling gimp_gegl_buffer_set_extent(), so that if
the call triggers clearing of partial tiles, these tiles don't get
unnecessarily validated.

(cherry picked from commit fcc1c3d380)
2020-01-18 12:43:08 +02:00
Ell
44bf74a8d0 app: disable transform clipping for layer groups
Using any clipping mode other than ADJUST is currently broken for
layer groups, since each layer in the group is clipped
individually, instead of clipping being applied to the group as a
whole.  Ultimately, we should fix that, but for now, simply disable
clipping for layer groups, by overriding GimpItem::get_clip() to
always return ADJUST.

(cherry picked from commit 203bc9d893)
2020-01-18 11:13:30 +02:00
9c654d8386 app,autotools: depend on babl 0.1.74 and GEGL 0.4.20 2020-01-17 17:06:35 +01:00
Ell
b1c9173b1f app: use gimp_gegl_node_get_key() in GimpFilterTool
... instead of doing the same thing manually.  This was supposed
to be part of the previous commits.

(cherry picked from commit 10a528ed2f)
2020-01-17 16:45:22 +02:00
Ell
9ee4091738 pdb: add missing change to last commit 2020-01-17 12:21:34 +02:00
Ell
b55afe8703 Issue #4366 - Color-to-alpha unnecessarily grayed out for grayscale images
Don't disable color-to-alpha for grayscale drawable, since the
operation is applicable to grayscale images (in particular, it
doesn't add color where there was none), and since we no longer
distinguish between layers and channels according to the drawable
format when updating the filters actions.
2020-01-17 12:12:57 +02:00
Ell
75d5eb7800 Issue #1975 - Color to alpha now requires an alpha-channel ...
... (used to add one automatically)

In GimpFilterTool and gimp_drawable_apply_operation(), use
gimp_drawable_filter_set_add_alpha() to add an alpha channel when
applying an operation that specifies "needs-alpha" to a drawable
that can have alpha.

Don't disable gegl:color-to-alpha (which has "needs-alpha") when
the drawable doesn't have an alpha channel, if one can be added.
2020-01-17 12:12:57 +02:00
Ell
868a64c0f8 app: in GimpFilterTool, consolidate drawable-filter option setup
In GimpFilterTool, move all the drawable-filter option setup to a
new gimp_filter_tool_update_filter() function, and call it whenever
the drawable-filter's options need to be updated.  This avoids
duplicating logic in various places.
2020-01-17 12:12:57 +02:00
Ell
8a54c78e6b app: add gimp_gegl_node_get_key()
... which gets an operation-class key for the operation associated
with the node, if any.
2020-01-17 12:12:57 +02:00
Ell
29a02b2949 app: add GimpDrawable::supports_alpha() vfunc
Add a new GimpDrawable::supports_alpha() virtual function, and a
corresponding gimp_drawable_supports_alpha() function, which
determine if the drawable supports an alpha channel.  The default
implementation returns FALSE, and GimpLayer overrides it to return
TRUE.
2020-01-17 12:12:57 +02:00
Ell
6c0d20c9e6 app: silence warning in gimp_transform_resize_crop()
The crop-to-result and crop-with-aspect transform-boundary
algorithms seem to consistently fail in some cases, and spit out a
warning, which can be too verbose if it triggers the debug dialog.

Demote the warning to a g_printerr(), with an eye to just dropping
these algorithms altogether.

(cherry picked from commit 0103fe2c19)
2020-01-17 00:29:46 +02:00
c696cc0a10 Update NEWS to match recent changes 2020-01-16 20:35:24 +00:00
Ell
f2715936cc app: add "Synchronous preview" option to transform tools
Add a "Synchronous preview" option to the transform-grid tools,
which renders the composited preview synchronously.  This reduces
the lag for painting the preview, but can harm responsiveness for
bigger images, where rendering the preview is slow.

This is mostly an experimental option for now; it will become more
interesting once we have mipmap rendering.

(cherry picked from commit 52cd27f0d3)
2020-01-16 11:41:17 +02:00
Ell
456ede52e8 app: in GimpTileHandlerValidate, fix tile-data pointer for negative coords
In gimp_tile_handler_validate_validate_tile(), when validating a
partial tile with negative coordinates, make sure to adjust the
result of the modulo when calculating the tile-realtive coordinates
so that they're non-negative, to fix the tile-data pointer offset.

(cherry picked from commit d39822bcd7)
2020-01-16 01:58:58 +02:00
Ell
0077eabce5 app: add "Composited preview" option to transform tools
Add a "Composited preview" option to all transform-grid tools,
which displays the transform preview as part of the image
composition (i.e., as it would actually look when applying the
transformation, keeping the layer at the right position in the
stack, and with the right layer mode), instead of using an overlay.

This option is off by default, since it's generally slower to
render than an overlay, due to the lack of mipmap rendering.  We're
also still using an overlay when transfoming a selection, and not a
whole layer.
2020-01-16 00:35:06 +02:00
Ell
c4a621d1dc app: freeze drawable preview in transform tools
In GimpTransformGridTool, when transforming a drawable, freeze the
drawable's preview while the tool is active, so that its ancestors'
previews don't get unnecessarily updated in response to hiding it.
2020-01-16 00:35:06 +02:00
Ell
54a95ab75b libgimpmath: add gimp_matrix3_equal()
... which compares two matrices.
2020-01-16 00:35:06 +02:00
Ell
6d7e18ff8a app: add gimp_drawable_filter_set_override_constraints()
In GimpDrawableFilter, add a
gimp_drawable_filter_set_override_constraints() function, which
allows bypassing certain constraints applied to the filter, based
on the drawable type and state.

Yes, this is a bit of a hack, added mostly as a quick-and-dirty way
to allow us to add filters to layer masks that affect their
bounding box, in preparation for composited transform previews.
2020-01-16 00:35:06 +02:00
Ell
1485e1d143 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:35:06 +02:00
Ell
41ca26523c app: calculate drawable bounding box according to graph by default
Change the default implementation of
GimpDrawable::get_bounding_box() to return the drawable source
node's bounding box, instead of the drawable's item bounds.  This
allows filters to affect the size of all drawables, including, in
particular, layer masks.

Change GimpLayer's implementation of get_bounding_box() to return
the intersection of the layer's own bounding box, and the layer
mask's bounding box (if it has one), and update the layer's
bounding box when the mask is enabled/disabled, or when its
bounding box changes.
2020-01-16 00:35:06 +02:00
Ell
a2654ef7ce app: implement GimpPickable::flush in GimpGroupLayer
... by synchronously flushing the group's projection.  This is
necessary for pass-through groups, since their projection is
normally flushed asynchronously.

(cherry picked from commit 7f84f10154)
2020-01-15 22:05:35 +02:00
Ell
e409f301fe app: handle GimpTileHandlerValidate::invalidated in gimp:buffer-source-validate
In gimp:buffer-source-validate, invalidate the node in response to
GimpTileHandlerValidate::invalidated, added in the previous commit,
in addition to GeglBuffer::changed.

(cherry picked from commit bb8ee0e686)
2020-01-15 21:50:21 +02:00
Ell
0a93f5609e app: add GimpTileHandlerValidate::invalidated signal
Add a new GimpTileHandlerValidate::invalidated signal, which is
emitted when a region of the buffer is invalidated.  This would
allow us to properly invalidate the graph in response; this
normally happens in response to GeglBuffer::changed, but this
signal is not emitted when a region is merely invalidated.

(cherry picked from commit 3ea391602e)
2020-01-15 21:50:20 +02:00
Ell
537ae20fa0 app: allow calling gimp_tile_handler_validate_validate() with a NULL rect
... and validate the entire buffer.

(cherry picked from commit ba6040bbcd)
2020-01-15 21:50:20 +02:00
df850fa394 Return FALSE on gimp_osx_focus_window to avoid endless loop
(cherry picked from commit 3e78c674d8)
2020-01-15 17:44:53 +01:00
Ell
628833426a libgimpmath: add version annotations to new matrix functions 2020-01-15 18:25:06 +02:00
Ell
4a4999082a icons: fix PNG 3D-transform icons in makefile 2020-01-15 18:15:31 +02:00
3f7bb5b934 Update Spanish translation 2020-01-15 15:01:49 +00:00
ef87fe9497 Update Japanese translation 2020-01-13 14:22:14 +00:00
676b8a77fe Update Polish translation 2020-01-12 19:28:55 +01:00
5b60aab22a Update Japanese translation 2020-01-12 16:15:03 +00:00
7a0c04b9f1 Update Japanese translation 2020-01-12 16:07:27 +00:00