Commit Graph

43105 Commits

Author SHA1 Message Date
a61fb20e18 Update Turkish translation 2019-08-11 17:55:50 +00:00
66e1601bca Update Turkish translation 2019-08-11 17:54:40 +00:00
1e23fa2828 Update Turkish translation 2019-08-11 17:52:27 +00:00
a9784d7b5f Update Polish translation 2019-08-11 15:06:46 +02:00
Ell
fd29ee1997 app, menus: add "Image -> Transform -> Arbitrary Rotation..." action
Add a gimp-rotate-image-arbitrary action, and a corresponding
"Image -> Transform -> Arbitrary Rotation..." menu entry, which
activates the rotate tool in image mode (similarly to the
corresponding action for layers).

(cherry picked from commit 8bff415f59)
2019-08-11 00:34:29 +03:00
Ell
7c7983d5ef app: use gimp_transform_tool_set_type() in tools-rotate-arbitrary action
... so that the original transform-type of the rotate tool is
restored once the layer is rotated.  Additionally, make sure to
set the tool's transform-type even if it's already active.

(cherry picked from commit 52ad37a2aa)
2019-08-11 00:30:18 +03:00
Ell
1e52fc5fa9 app: add gimp_transform_tool_set_type()
... which temporarily changes the transform-type of the tool,
restoring the original type once it's halted.  To be used when
activating a transform tool through an action for a specific
transform type.

(cherry picked from commit f651db52fb)
2019-08-11 00:30:17 +03:00
Ell
5903c9c71d app: add "Image" transform type to transform tools
Add a new "Image" transform type to the transform tools, in
addition to the existing "Layer", "Selection", and "Path" transform
types.  The "Image" mode transforms the entire image, rather than a
single item.  In tools with a preview, the preview shows the
transformed image projection.  The clipping mode controls how the
canvas is clipped during the transform; in particular, the ADJUST
clipping mode resizes the canvas to fit its transformed size.

(cherry picked from commit e4990bee7b)
2019-08-11 00:30:17 +03:00
Ell
cd4eaf6e54 app: indentation fixes in the transform tools
(cherry picked from commit 9f823c396a)
2019-08-11 00:30:16 +03:00
Ell
3675916880 app: use a pickable instead of a drawable in GimpCanvasTransformPreview
In GimpCanvasTransformPreview, use a GimpPickable, instead of a
GimpDrawable, as the preview source, so that we can use it with the
image projection, rather than just with drawables.

(cherry picked from commit 6023f97509)
2019-08-11 00:30:16 +03:00
Ell
e5d1f5ac4b app: add gimp_display_shell_show_image()
... which controls whether or not the image is rendered by the
shell.  We'll use this to hide the image while showing its
transform preview in the next commits.

(cherry picked from commit 539d666ae2)
2019-08-11 00:30:14 +03:00
Ell
52c66bca5e app: add gimp_image_transform()
Add a new gimp_image_transform() function, which transforms the
entire image, including all layers, channels (including selection
mask), vectors, guides, and sample points, according to a
transformation matrix.  The canvas is resized according to the
clip_result parameter, the same way drawables are resized during
transformation; the layers are resized using ADJUST mode
regardless.

(cherry picked from commit c45f1b4148)
2019-08-11 00:29:33 +03:00
Ell
2558d77d1c app: add gimp_image_flip_full()
... which takes the symmetry axis as a parameter, instead of hard-
coding the axis to the middle of the image, and which additionally
takes the clipping mode as a parameter, controlling whether to clip
or resize the canvas.  Note that the actual canvas size never
changes, but it may be offset when flipped around an off-center
axis, without clipping.

Implement gimp_image_flip() in terms of gimp_image_flip_full().

(cherry picked from commit ae080f06f9)
2019-08-11 00:29:32 +03:00
Ell
20dd07ca45 app: fix sample-point OOB check in gimp_image_resize[_with_layers]()
(cherry picked from commit d13c6ce3e0)
2019-08-11 00:29:32 +03:00
Ell
75d3276aa7 pdb: fix image-mask transforms
In the various PDB transform functions, avoid erroneously creating
a floating selection when transforming the image mask, and rather
transform the mask normally.
2019-08-09 22:24:04 +03:00
Ell
f221b424c0 app, pdb: use gimp_item_get_clip() everywhere
Remove the special clipping-mode handling for channels throughout
the transform (and drawable-filter) code, and rather use
gimp_item_get_clip(), added in the previous commit, instead.  As
mentioned in the previous commit, we only modify the clipping mode
in top-level code, while having lower-level code use the clipping
mode as-is.  This not only hides the actual clipping-mode logic
from the transform code, but, in particular, allows code performing
transformation internally to use arbitrary clipping modes.

Also, this commit fixes a bunch of PDB bugs all over the place :)
2019-08-09 22:24:03 +03:00
Ell
3a7972e5fb app: add gimp_item_get_clip()
Add a new GimpItem::get_clip() virtual function, and a
corresponding gimp_item_get_clip() function, which return the
actual clipping mode to be used when transforming (or applying a
filter to) a given item, given the original clipping mode.  This
applies only to whole-item transformations (i.e., when not creating
a floating selection), and should be used by the top-level code
applying the transformation, rather than by the actual
transformation code, so that the item can be transformed using a
different clipping mode internally.

Provide a default implementation that simply returns the input
clipping mode, and override for GimpChannel (to always return CLIP)
and for GimpVecotrs (to always return ADJUST).

(cherry picked from commit d5cdcc6c02)
2019-08-09 22:23:57 +03:00
Ell
a0d43cd927 app: fix layer-mask offset when applying filter to layer without clipping
(cherry picked from commit f9fb3e6fad)
2019-08-09 22:23:57 +03:00
Ell
037bc8575e app: limit color-history palette size
Limit the color-history palette size (currently, to 256 colors), to
avoid slowdowns, especially during loading.

(cherry picked from commit 07b7d63a7d)
2019-08-07 19:20:59 +03:00
Ell
8d15563f4c Issue #3718 - Large colorrc file causes lag when painting with a new color
In gimp_palette_mru_add(), if the added color doesn't match an
existing color, don't look for two duplicate existing colors (which
has quadratic complexity), since there shouldn't be any under
normal circumstances (as we're not adding duplicates to begin
with).

(cherry picked from commit e60829767e)
2019-08-07 19:20:58 +03:00
5db729bdbe Update Russian translation 2019-08-07 14:23:25 +03:00
6a36bdacf1 Update Russian translation 2019-08-07 14:02:37 +03:00
0c97288782 Update Russian translation, fix #3763 2019-08-07 13:51:03 +03:00
0e8cdd0f74 m4macros: fix pythondev.m4.
My previous commit was bugged. Fix it and simplify the code a bit. No
need to check for existence for non-versionned include directory on
Windows. Just add the non-versionned dirs at the end, without other
condition that the target platform being Windows. This way, whether the
headers are installed in the versionned or non-versionned dirs, they
will be found.
2019-08-06 19:09:00 +02:00
ac0c81b38f m4macros: Windows may have a versioned directory for headers.
Basically the same fix as 61c11b04c1, on
pythondev.m4 (for Python2) instead of python3dev.m4.
2019-08-06 16:38:49 +02:00
30e4a7ee5e Issue #3112 - Missing mnemonics. 2019-08-05 20:06:50 +00:00
9587c125d4 pdb: fix the names of the oilify compat PDB wrappers
(cherry picked from commit 21d63d6c65)
2019-08-04 23:32:27 +02:00
176219020a libgimpbase: remove the gimp protocol mutex and gp_lock()/gp_unlock()
The protocol is supposed to be used recursively, the locks just
deadlock in some situations. Threaded use of the wire protocol is
simply forbidden.
2019-08-04 22:49:25 +02:00
ea09260012 Update German translation 2019-08-04 19:25:33 +00:00
23a94b32fc Update Polish translation 2019-08-04 15:19:02 +02:00
f3f3d066a6 app: better error reporting in gimp_pdb_dialog_run_callback()
Display the error returned from trying to run the temp procedure.

(cherry picked from commit 910828bf51)
2019-08-03 17:32:35 +02:00
Ell
965756b17f Issue #3723 - Symmetry Painting with random colour isn't symmetrical
In GimpPaintbrush, calculate grad_point in
_gimp_paintbrush_motion() independently of any stroke, and pass
its value down to GimpPaintbrush::get_paint_params() at each
stroke, so that the color is the same for all strokes, even when
using a color/random dynamics.

(cherry picked from commit 95429ad704)
2019-08-02 22:29:49 +03:00
Ell
2c8006896d app: in GimpFilterTool, add "clipping" option
In GimpFilterTool, add a new "clipping" option, which can be either
Adjust or Clip.  This option is controllable for layers, when
there's no selection mask.

When set to Adjust, which is used by default, the filter's output
may extent past the drawable's boundary, and the drawable will be
resized to match the output when committed.

(cherry picked from commit eaec9443c3)
2019-08-02 00:40:31 +03:00
Ell
97d666ff41 app: add gimp_drawable_filter_set_clip()
In GimpDrawableFilter, add a new gimp_drawable_filter_set_clip()
function, which controls whether the filter clips the result to the
drawable's boundary, or extends it past it.  The latter is only
possible for layers, when the selection mask is empty.

(cherry picked from commit b7f53262fc)
2019-08-02 00:40:27 +03:00
Ell
ed46ba4ded 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.

(cherry picked from commit 89a9cf7e49)
2019-08-02 00:40:27 +03:00
Ell
bba810a9e5 app: in gimp_gegl_apply_cached_operation(), copy cached result *before* rejigging graph
In gimp_gegl_apply_cached_operation(), copy the cached results to
the destination buffer *before* reconnecting the operation node, as
this may cause the cache to be cleared (see commit
gegl@4347255cd9d5031e6757c70fdde5c63539d5f508).

(cherry picked from commit 35729ee02a)
2019-08-02 00:40:27 +03:00
Ell
114da41d61 app: in gimp:replace, implement GeglOperation::get_bounding_box()
... similarly to gimp:layer-mode, however, assume the destnation
(backdrop) is not included when the layer's opacity is 1, and
there's no mask.

(cherry picked from commit 998f89e3cb)
2019-08-02 00:40:26 +03:00
Ell
ea5b5e305a app: in gimp:layer-mode, implement GeglOperation::get_bounding_box()
... to take the layer's composite mode and opacity into account.

(cherry picked from commit 89c97bcf26)
2019-08-02 00:40:26 +03:00
Ell
05a2061776 app: in gimp:mask-components, implement GeglOperation::get_bounding_box()
... to forward the input/aux bounding box when the component mask
is fully clear/set, respectively.

(cherry picked from commit 9900fb74f2)
2019-08-02 00:40:25 +03:00
Ell
a0742047b5 app: in gimp:compose-crop, fix x/y properties lower bound
... from 0 to G_MININT.

(cherry picked from commit 332f662cda)
2019-08-02 00:40:25 +03:00
Ell
8c7d13541d app: calculate bounding box of group layers
In GimpGroupLayer, when recalculating the group's size as a result
of a change to one of the child layers (now including in response
to a child layer's GimpDrawable::bounding-box-changed signal),
calculate the group's bounding box (the bounding box of all its
child layers' bounding boxes) alongside its logical bounds.  Like
in GimpLayer, use the logical bounds as the bounding box if the
group has a mask.

This bounding box is passed to the group's projection, via
GimpGroupLayer's GimpProjectable::get_bounding_box()
implementation, resulting in a buffer whose extent is the same as
the bounding box.

(cherry picked from commit ad1f3d20fb)
2019-08-02 00:40:25 +03:00
Ell
1359c1cb47 app: add support for projectables with an arbitrary bounding box
In GimpProjectable, replace gimp_projectable_get_size(), which only
returned a width and a height, with
gimp_projectable_get_bounding_box(), which returns a full
rectangle.  This allows projectables to have an arbitrary bounding
box, not limited to a (0, 0) top-left corner.

Adapt GimpProjection, creating a buffer with corresponding extent
to the projectable's bounding box.

Adapt GimpImage and GimpGroupLayer.

(cherry picked from commit 8ff43942d6)
2019-08-02 00:40:24 +03:00
Ell
ea27923868 app: implement GimpDrawable::get_bounding_box() for GimpLayer
Implement GimpDrawable::get_bounding_box() for GimpLayer, by
returning the bounding box of its source node.  If the layer has a
mask, we simply return its logical boundary, since the layer can't
extend past the mask.

(cherry picked from commit 7a05d15f7e)
2019-08-02 00:40:24 +03:00
Ell
917f46f184 app: maintain drawable bounding box separately from its logical boundary
Maintain the bounding box of drawables (i.e., the bounds of their
actual rendered content) separately from their logical boundary (as
shown in the UI).

The bounding box is calculated through the new
GimpDrawable::get_bounding_box() virtual function, which has a
corresponding gimp_drawable_get_bounding_box() function; the
default implementation simply returns the drawable's logical
boundary.  The bounding box is specified in drawable coordinates,
i.e., it's not affected by the drawable's offset.

The bounding box is recalculated through
gimp_drawable_update_bounding_box(), which should be called
whenever a change may affect the bounding box (for example, when
setting a new buffer, as done implicitly by GimpDrawable's
::set_buffer() implementation, or when a drawable filter's
properties change, as will be done by GimpDrawableFilter in a
following commit).  When the bounding box changes, the affected
regions of the drawable are updated, and the
GimpDrawable::bounding-box-changed signal is emitted.

When gimp_drawable_update() is called with negative width/height
values, the entire drawable's bounding box is updated, rather than
only its logical boundary.

Likewise, GimpDrawableStack and GimpLayerStack are adapted to use
the bounding box, instead of the logical bounds, when updating the
drawable's area.

(cherry picked from commit 153cb33eec)
2019-08-02 00:40:23 +03:00
Ell
c217876a47 app: in GimpDrawable::set_buffer(), take bounds rect instead of offset only
In GimpDrawable::set_buffer(), and the corresponding
gimp_drawable_set_buffer_full() function, take a bounds rectangle,
which specifies both the drawable's new offset and its new size,
instead of only taking the new offset.  In
gimp_drawable_real_set_buffer(), set the item size according to the
rect dimensions, instead of the buffer dimensions.  The rect's
width/height may be 0, in which case the buffer's dimensions are
used.

Adapt the rest of the code.

We do this in preparation for maintaining the drawable's bounding
box separately from its logical bounds, allowing the drawable
content to extend beyond its bounds.

(cherry picked from commit 3afdd7c5c2)
2019-08-02 00:40:17 +03:00
8bf31bd8d1 libgimpcolor: fix "Since:" on gimp_param_spec_rgb_get_default() 2019-08-01 12:53:07 +02:00
30e02aeeac libgimpbase: capitalize some docs section titles
(cherry picked from commit d66b845bac)
2019-08-01 12:52:55 +02:00
3822dec73f Update Russian translation 2019-08-01 00:20:35 +03:00
1f5131720a Update Spanish translation 2019-07-31 12:51:29 +00:00
Ell
2bdbc2f16d app: fix #include in gimpdrawable.c
Local foo leak.

(cherry picked from commit 2331b88d7d)
2019-07-30 21:37:02 +03:00