Commit Graph

45078 Commits

Author SHA1 Message Date
Ell 5646e03eb3 app, icons: add 3D Transform tool
Add a new 3D Transform tool, based on GimpToolTransform3DGrid,
added in the previous commit.  The tool UI provides a notbook with
three tabs, corresponding to the three GimpToolTransform3DGrid
modes:

  Camera - allows setting the primary vanishing point, as well as
  the camera's focal length, expressed either directly, or as the
  camera's angle of view, relative to the whole image or the
  transformed item.  By default, the vanishing point is aligned
  with the item's center, and the angle of view is fixed relative
  to the item; this essentially means that each item is transformed
  using a local perspective, independent of its position and size
  relative to the image.  A global perspective can be achieved by
  using a common vanishing point and focal length (or an image-
  relative angle of view).

  Move   - allows moving the item using X, Y, and Z offsets.

  Rotate - allows rotating the item using X, Y, and Z Euler angles.
  The order of rotation of the different axes can be controlled by
  a set of numbered buttons next to the sliders, and the rotation's
  pivot can be controlled using a pivot selector.
2020-01-06 21:52:54 +02:00
Ell 615035c101 app, cursors: add GimpToolTransform3DGrid tool widget
Add a new GimpToolTransform3DGrid tool widget, subclassed from
GimpToolTransformGrid, which can be used to perform 3D
transformations.

The widget can be in one of three modes:

  CAMERA - allows adjusting the primary vanishing point by moving a
  handle.

  MOVE   - allows moving the object through dragging.

  ROTATE - allows rotating the object through dragging.

By default, controlling the transformation through dragging applies
to the X and Y axes.  Holding Shift (or setting the "constrain-
axis" property) restricts the motion to only one of the axes.

For the MOVE and ROTATE mode, holding Ctrl (or setting the "z-axis"
property) allows controlling the Z axis instead.

For the same modes, holding Alt (or setting the "local-frame"
property), applies the adjustments in the object's local frame of
reference, instead of the display's global frame of reference.
2020-01-06 21:52:51 +02:00
Ell 4ddf1afb44 app: add a protected gimp_tool_transform_grid_get_handle() function
... which can be used by subclasses to retrieve the currently-
active handle.
2020-01-06 21:50:00 +02:00
Ell 0f697b897f app: add GimpTransformGridTool::dynamic-handle-size property
Add a boolean GimpTransformGridTool::dynamic-handle-size property,
which controls whether the handle sizes are adjustment dynamically
according to the grid's size, or remain fixed.  This property is
TRUE by default, to maintain the current behavior.
2020-01-06 21:50:00 +02:00
Ell 0eae8a47ea app: in GimpToolTransformGrid, add NONE function
In GimpToolTransformGrid, allow setting "inside-function" and
"outside-function" to a new NONE value, performing no
transformation when dragging the respective area.
2020-01-06 21:50:00 +02:00
Ell d84789dcb7 app: add gimp-transform-3d-utils.c
Add gimp-transform-3d-utils.c with various utility functions for
performing 3D transformations, in preparation for adding a 3D
transform tool.
2020-01-06 21:49:57 +02:00
Ell e3bc877a42 libgimpmath: add various GimpMatrix4 functions
Add gimp_matrix4_{identity,mult,transform_point}().
2020-01-06 21:49:57 +02:00
Ell edfc837e7d libgimpmath: add various GimpMatrix2 functions
Add gimp_matrix2_{determinant,invert,transform_point}().
2020-01-06 21:49:57 +02:00
Ell c0552de62b app: add a pivot selector to the Rotate tool
Add a GimpPivotSelector widget to the Rotate tool dialog, to allow
for quickly picking a pivot.
2020-01-06 21:49:54 +02:00
Ell 46e01d37db app, icons: add GimpPivotSelector widget
GimpPivotSelector is a 3x3 grid of toggle buttons, used for
selecting a natural pivot position (e.g., for a transform) relative
to an item: its center, its corners, and the midpoints of its
edges.
2020-01-06 21:35:52 +02:00
Ell ac74326ec7 app: reduce dialog size of Unified Transform tool and friends
The tool dialog of generic-transform tools (the Unified,
Perspective, and Handle Trasnform tools) shows the current
transformation matrix.  Although we might as well show *something*
in the dialog (we can't get rid of it altogether, as it provides
the common tool actions), this information is probably meaningless
for most users, and isn't directly editable anyway.

Reduce the size of the matrix, to make it less prominent, and free
up some space.
2020-01-06 21:35:52 +02:00
Ell b0e9639684 app: in GimpTransformGridTool, compress successive undo steps
Add a boolean 'compress' parameter to
gimp_transform_grid_tool_push_internal_undo().  When TRUE,
successive undo steps added rapidly are compressed into a single
step.

In the various subclasses, compress undo steps for dialog changes,
since we push an undo step for every intermediate change for those
(such as while dragging a spin-scale).  In contrast, we only push
tool-widget undo steps upon button release, hence there's no need
to compress them.
2020-01-06 21:35:52 +02:00
Ell ee425f88d8 app: in GimpTransformGridTool, avoid unnecessarily flushing image when pushing undo
In gimp_transform_grid_tool_push_internal_undo(), only flush the
image when undo/redo availability for the tool changes, instead of
for every undo step.  This speeds things up when many undo steps
are pushed in succession, which usually happens when using the tool
GUI.
2020-01-06 21:35:52 +02:00
Ell 24add95e0a app: fix indentation in gimptoolsheargrid.c 2020-01-06 21:35:52 +02:00
Ell a9e357d72d libgimpwidgets: fix percentage use in size-entry arithmetic when lower-bound != 0
In GimpSizeEntry, the value corresponding to 0%, as per
gimp_size_entry_set_size(), may be non-zero.  This works correctly
when using the size entry in percentage mode, but not when using
precentage as part of arithmetic.

Fix this by adding an 'offset' parameter to eevl's unit-resolution
callback, which can be specifies a constant value to add as part
of unit conversion, after scaling the converted value by the
conversion factor.  In GimpSizeEntry, use this parameter to offset
percentages by their lower bound.
2020-01-06 21:35:52 +02:00
Cyril Richard 38cccaac49 Issue #4203 - Wavelet decomposition only on RGB images
Add GRAY* to the list of supported image types.
2020-01-06 19:47:44 +01:00
Massimo Valentini c39d8fde33 Issue 2862 - Error message. Unable to decode abr...
...format version 10.

Simply allow the parser to read version 10, seems to work
with the brushes in issue #2862.
2020-01-06 19:32:04 +01:00
Elle Stone bb660c5821 Issue #3588 - Add Yu'v' (CIE 1976 UCS) to GIMP color picker
Which is a linear transform of xyY that is more perceptually
uniform, and so well-suited for eventually adding chromaticity
diagrams to GIMP color tools. ACES documentation uses this color
space instead of xyY for showing chromaticity diagrams. Moving
forward I expect other venues also will start using Yu'v' as
the advantages over xyY chromaticity diagrams are fairly obvious.
2020-01-06 19:19:24 +01:00
woob a11ada4ce2 app: expand functionality of merge-down button
Adds a number of modifier keys to the layer dockable's new "Merge Down"
button to access further functions, and adds among them a new action to
merge visible layers using the dialog's last values, akin to those
accompanying the New Layer and Add Layer Mask dialogs.

Modifier keys are bound as follows:
  Shift -> Merge layer group
  Ctrl -> Merge visible layers
  Ctrl + Shift -> Merge visible layers from last used values

The Merge Down button is kept sensitive even when the current layer
can't be merged down to allow access to these functions
2020-01-06 17:28:46 +00:00
woob f539fc78c0 app: consolidate UI for merging down and anchoring layers (issue #1184)
As they are both mutually exclusive and serve an almost identical
purpose, the "Merge down" and "Anchor Layer" are given mutually
exclusive visibility in menus, and the anchor button is replaced
with a merge down button in the Layers dockable whenever there is
no active floating selection
2020-01-06 17:28:46 +00:00
Michael Natterer 97bbd4773e libgimp: fix writing empty array GValues in gimp_value_to_gp_param()
When g_value_get_boxed() returns a NULL array, we would encode
nonsense on the wire and run into warnings. Now we simply send a
zero-length array.
2020-01-06 16:16:18 +01:00
Ryuta Fujii 2679d66ffb Update Japanese translation 2020-01-06 14:35:25 +00:00
Massimo Valentini 653484df0b Issue #4467 - (pagecurl) CRITICAL **: g_object_unref: assertion...
...'G_IS_OBJECT (object)' failed

Fix the meson build script to output the right icon path prefix.
2020-01-06 14:49:41 +01:00
Massimo Valentini c33e1263fa Issue #4461 - Spinning Globe fails in gimp-2.99
Fix argument indices.
2020-01-06 14:35:05 +01:00
Ryuta Fujii a1939247fb Update Japanese translation 2020-01-06 09:41:41 +00:00
Ryuta Fujii 29554e6f68 Update Japanese translation 2020-01-06 09:36:12 +00:00
Michael Natterer afe19ff393 libgimp: GimpProcedureDialog: next time save before committing... 2020-01-05 18:57:17 +01:00
Michael Natterer f2cf791a25 libgimp: document GimpProcedureDialog's properties 2020-01-05 18:37:58 +01:00
Michael Natterer bffb753558 Issue #4458 - gimp-console-2.99 -b '(gimp-quit 1)' segfaults
Don't check for GIMP_IS_PARAM_SPEC_STRING(), it's internal
to the core and G_IS_PARAM_SPEC_STRING() is good enough in
most cases. Spotted by Massimo.
2020-01-05 17:31:45 +01:00
Michael Natterer 4dfcffe4f7 Remove all checks for finite() and isfinite()
and simply use isfinite() everywhere, it's part of C99.
2020-01-05 16:36:18 +01:00
Massimo Valentini 5adde64753 Issue 4456: CRITICAL **...: g_object_unref: assertion
...'G_IS_OBJECT (object)' failed
2020-01-05 12:36:01 +01:00
Jordi Mas 157a5dc8b7 Fixes to Catalan translation 2020-01-04 12:28:28 +01:00
Jehan 39f7dd269d gitlab-ci: run unit tests for meson builds.
Not because they are working better than the ones in autotools, but
rather because it seems they are simply barely implemented! So of
course, the few tests currently there work.
2020-01-04 00:55:37 +01:00
Jehan b2c41bc1f9 app: forgot to localize a string.
Thanks to Piotr Drąg for noticing.
2020-01-04 00:45:14 +01:00
Jehan 0a28534a90 app: fix a segmentation fault crash.
gtk_widget_get_window() may return NULL. I had the case when opening
some menus in bottom of tool options (like the "Save|Restore Tool
Preset" menus). We must check this before doing anything with it.
2020-01-03 21:26:21 +01:00
Jehan 5b664ecbec app: properly pass the last release version and date to gimp-debug-tool.
Previously we were only passing this information on the debug dialog
when debugging warnings and criticals. Now it will also have the
information for crashes, hence recommending people to update their GIMP
instead of reporting bugs on old versions.
2020-01-03 20:08:12 +01:00
Jehan 2cd765c000 plug-ins: variable used after being freed.
Once again spotted by Massimo in #4449.
2020-01-03 19:57:59 +01:00
Jehan 189da39805 plug-ins: return value of gimp_procedure_config_begin_export() freed…
… twice.
It should not be freed by the caller since it is annotated as (transfer
none). It gets freed when calling gimp_procedure_config_end_export().
Thanks to Massimo for noticing.
2020-01-03 19:53:54 +01:00
Jehan 109ad86db2 gitlab-ci: test a CLang build. 2020-01-03 13:16:21 +01:00
Jehan 2f379494a7 app: debug dialog will now advise to update when relevant.
Instead of making the focus on bug reporting, the debug dialog will now
make the focus on updating the application if it is found that one is
not using the last version.
Debug data (backtraces and co.) will still be available and copiable,
but under an expander, and bug report button won't be displayed (i.e.
data will still be available upon request but we don't push anymore
people to submit it directly if they are using old versions of GIMP).

Of course, if you are using the last version (or version check was not
possible), the dialog still stays the same.
2020-01-02 23:36:46 +01:00
Jehan d5febf6e62 app: parse the release date for the last release.
I was mistakenly using the date of the last check, not the release date.
2020-01-02 23:09:23 +01:00
Jehan df492fa898 gitlab-ci: port our main CI to Debian testing.
The old custom ArchLinux got broken (apparently by some package
signature verification which fails, and obviously we don't want to
bypass these for security reasons).

I took the opportunity to port to Debian testing because this is GIMP's
base distribution for support (basically dependency versions must be in
Debian testing) so it makes sense that our CI is based off it as well.

Note though that I am not against additional CI tests so if someone
absolutely wants to get the Archlinux-based CI back and thinks it gets
us some additional worthy test, feel free to fix whatever was broken
then we may add it back (having both Debian testing and Archlinux CI).
2020-01-02 02:46:21 +01:00
Jehan 89ed6ae8ee devel-docs: update the stats script.
Look up commit stats for meson build system and Gitlab CI, and small fix
on icon stats.
2020-01-01 23:27:43 +01:00
Jehan 24a0b0c53a plug-ins: also omit hidden layer groups in PDF export.
When the "Omit hidden layers and layers with zero opacity" option is
set, this property was only checked on non-group layers. So if we had
non-hidden layers inside hidden layer groups, they ended up exported,
which is not the expected behavior.

See https://gitlab.gnome.org/GNOME/gimp/issues/4425#note_675350
2020-01-01 18:40:52 +01:00
Jehan 34f05750d0 plug-ins: forgot to look missing font duplicates recursively.
Fix for the previous commit, fixes cases with text layers inside groups.
2020-01-01 18:28:04 +01:00
Jehan 1b06067164 Issue #4425: Saving to PDF changes text's font and size.
Adds a new PDF export option "Convert text layers to image", which
defaults to FALSE (because text staying text is obviously usually
prefered).
Also loop through text layers to detect missing fonts. In case any are
found, add a warning in the export dialog, below the new option,
advising to enable this option if design matters (if fonts are missing,
PangoCairo seems to select any other random font and embed it into the
PDF instead of the expected one).
2020-01-01 17:53:02 +01:00
Michael Natterer ff32fe9f5d Issue #2227 - GIMP 2.10.6 crashes with assertion GIMP_IS_TAGGED in...
...MyPaint brushes dialog

In gimp_tag_entry_assign_tags(), don't add/remove tags while iterating
tag_entry->selected_items, because that might change the list. Instead,
make a temporary deep copy of the list and iterate the copy. Spotted
by Massimo.
2020-01-01 00:22:54 +01:00
Jehan 8f87277653 libgimpbase: same fix as previous commit to other static types.
This member of the GTypeInfo structure is the size of the object
instance (not of the parent instance). Let's fix it for all static type
registrations in this file, which had the same bug as commit
0eb6ff41cf.
Happy new year everyone!
2019-12-31 20:10:00 +01:00
Michael Schumacher 0eb6ff41cf libgimpbase: fix wrong sizeof in gimp_param_object_array_get_type
Spotted by Massimo Valentini. Fixes issue #4417.
2019-12-31 14:35:39 +01:00
Julien Hardelin 26db691197 Update French translation
(cherry picked from commit 66a833f8f2)
2019-12-30 09:17:19 +00:00