Commit Graph

79 Commits

Author SHA1 Message Date
Jehan 2b27feb2fd app, libgimp*, modules, pdb, plug-ins: new GimpParamColor.
This is meant to obsolete GeglParamColor with at least an additional argument
has_alpha which we need in GIMP. It allows to advertize when a parameter wants
an opaque color, which in particular means we know when displaying a GUI to pick
colors with alpha or not.
2024-04-19 23:25:13 +02:00
Jehan 252f991cfb app: swapping gimp_prop_color_button_new() and gimp_prop_gegl_color_button_new().
Color propwidgets now use GeglColor only.
2024-04-18 00:37:20 +02:00
Alx Sa 2b62976260 propgui: Port Color-To-Alpha GUI to GeglColor
The two threshold color pick buttons needed to have
a GeglColor parameter for their GimpPickerCallback
rather than a const GimpRGB.
This also fixes a crash caused by trying to free the GeglColor
rather than unreferencing it.
2024-03-19 14:32:14 +00:00
Jehan 77420957d8 app: use GEGL/babl to convert to HSL in gimp_operation_hue_saturation_map(). 2024-02-12 18:30:00 +01:00
Jehan 6a90581423 Issue #10808: Hue-Saturation GUI not showing colors.
Small function mixup! We needed the set_pixel() function.
2024-02-12 16:21:28 +01:00
Jehan 924dbb44a8 app, libgimpconfig: GimpFilterTool color_picked() now uses GeglColor.
In particular, the Curves, Levels and Operation tools method implemented
are updated. Also GeglColor arguments in GEGL operations are not
transformed into GimpRGB arguments anymore in GIMP. GeglColor GParamSpec
stay GeglColor now.
2024-02-11 23:28:04 +01:00
Jehan 8eb56586aa app, libgimpwidgets, plug-ins: GimpColorArea is now space-invaded.
This includes improvements on the out-of-gamut colored corner being shown for
unbounded component types out of the [0; 1] range (with some small margin of
error to avoid e.g. a -0.0000001 value to show as out-of-gamut).

There are still improvements to be made on the color rendering. In particular,
it still draws as CAIRO_FORMAT_RGB24 cairo surface. We should probably move to
draw as CAIRO_FORMAT_RGBA128F eventually (more precision and even allowing to
draw unbounded colors with a possible option, instead of always clipping).

Also adding the libgimpwidgets API gimp_widget_get_render_space().
2024-02-11 23:28:03 +01:00
Michael Natterer 26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Jehan 7056f1b960 app, libgimpwidgets: move gimp_prop_spin_scale_new() and…
… gimp_prop_widget_set_factor() to libgimpwidgets.

Now that GimpSpinScale is in libgimpwidgets, it's time to move the
associated prop too, to make it a prop widget with such a widget easily
creatable by plug-ins.

While doing so, I update both these functions logic, binding properties
together with the g_object_bind_property*() APIs (as we do already in
some other recent prop functions) rather than connecting to signals
ourselves. It makes for much simpler code.
2022-02-19 00:14:44 +01:00
Jehan ab1fc79a07 app, libgimpwidgets: move GimpSpinScale to libgimpwidgets.
There is really nothing specific to the core application, it is quite a
generic widget, so it would be nice for plug-ins to be able to use this
widget.
2022-02-17 23:13:42 +01:00
Jehan fd9f96f174 app: get rid of a wrong return-after-free report.
Reported by Massimo, though this one is wrong, as far as I can see.

`ninja scan-build` apparently reports `result` as being returned after
being freed here. But actually since we are setting the `error` with
g_set_error() in the same time we free `result`, we would also enter the
`if (*error)` block a few lines later, which would return NULL and not
`result` anyway. I guess the static analyzer could not see that far.

Still, set the pointer to NULL with g_clear_pointer(), which should be
enough to make the static analyzer happy.
2021-10-01 12:51:48 +02:00
Jehan 49e534247a app, libgimp*, pdb, plug-ins: use g_memdup2() instead of g_memdup()
Since it appeared with GLib 2.68.0, we could not change this until we
bumped the dependency which has only become possible a few days ago
(since Debian testing is our baseline for dependency bumps). Cf.
previous commit.

As this is a drop-in replacement (just a guint parameter changed to
gsize to avoid integer overflow), search-and-replace with:

> sed -i 's/g_memdup\>/g_memdup2/g' `grep -rIl 'g_memdup\>' *`

… followed by a few manual alignment tweaks when necessary.

This gets rid of the many deprecation warnings which we had lately when
building with a recent GLib version.
2021-08-26 17:32:09 +02:00
Jehan 025cebf76f app: free an unusing allocated string when not used as a result.
Another leak reported by Massimo.
2021-08-20 21:53:41 +02:00
Thomas Manni 0d519a606f app: fix config properties / spin buttons mapping for Convolution Matrix filter
The filter's output is now correct, and rotating/flipping the matrix works as
expected.
2021-01-31 13:09:15 +01:00
Ell 552991b2d2 app: return visible widgets from a few more gimp_prop() functions
... in particular, this fixes the Rotate Colors prop-gui.
2020-07-31 20:47:05 +03:00
Ell bbc0f18953 app: fix error propagation in boolean GUM grouping subexpressions 2020-06-12 01:35:04 +03:00
Ell 5c07bcd1ff app: fix reference parsing in boolean GUM expressions 2020-06-12 01:35:04 +03:00
Ell ca351d3520 app: misc cleanup in prop-gui range creation 2020-06-03 10:16:23 +03:00
Ell c7599626f4 app: fix prop-gui static range visibility 2020-06-03 10:16:22 +03:00
Ell 4492f61df4 app: in _gimp_prop_gui_new_generic(), use "range-label" pspec key as range label
... when available
2020-06-02 23:56:16 +03:00
Ell 438babea6b app: improve gegl:focus-blur prop-gui constructor
... by grouping the geometry options, which can be controlled
through the on-canvas UI, in an expandable frame, which is
collapsed by default.  The shape option is not part of the group,
and is moved to the top.
2020-06-02 23:25:26 +03:00
Ell 8eb752b194 app: use special prop-gui widget for luminance ranges
In _gimp_prop_gui_new_generic(), when a pair of consecutive
properties have "range-start" and "range-end" roles, respectively,
and "luminance" units, use a range prop-widget for both properties,
as per the previous commits.

The range is sorted by default, unless the first property has a
"range-sorted" key of "false".
2020-06-02 23:25:25 +03:00
Ell 8139836d5d app: fix parsing of GUM cross-property references 2020-06-01 22:40:27 +03:00
Ell ae801871e5 app: in gimp_prop_eval_string(), don't leak result upon trailing tokens 2020-06-01 22:40:27 +03:00
Ell 60d4d25b93 app: add gegl:focus-blur to Filters -> Blur
gegl:focus-blur blurs the image around a focal point.  It can be
used to create fake depth-of-field effects.

Add a prop-gui constructor which uses a FOCUS controller to control
the focus geometry.
2020-05-15 00:48:39 +03:00
Ell f6f0a8a2d8 app: add FOCUS controller to gegl:vignette
Add a prop-gui constructor to gegl:vignette, using a FOCUS
controller to control the op's geometry.
2020-05-15 00:48:39 +03:00
Ell 3a62c53009 app: add FOCUS prop-gui controller
... based on GimpToolFocus.
2020-05-15 00:48:39 +03:00
Michael Natterer 9593121431 app, libgimpwidgets: return visible widgets from all gimp_prop_foo_new()
and remove a gazillion gtk_widget_show() all over the place, some
places need a gtk_widget_hide() now, and I'm pretty sure I broke at
least one thing in all those files...
2019-09-25 20:24:06 +02:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00
Sabri Ünal 2e766f67d4 Missing mnemonics on several dialogs
paste as brush, paste as pattern, select to new brush, select to new pattern
fill selection outline, fill path, stroke selection, distort, rounded rectangle
indexed color conversion, merge visible layers, new guide, new guide (by percent)
image properties, newsprint, fractal explorer, sample colorize, new layer

metadata editor (just a button), spyroplus (only common buttons)
2019-09-05 22:41:19 +03:00
Michael Natterer ce44b04005 app: improve gegl:newsprint's GUI a lot
Add some frames, a notebook for the channels and toggles to lock all
channels' properties together.
2019-07-18 02:10:24 +02:00
Michael Natterer d718da27a8 app: add gegl:newsprint to Filters -> Distorts
and add a custom GUI constructor that does nothing special (yet).
2019-07-17 18:24:33 +02:00
Jehan 9042e85f3c app: make gimp_prop_gui_chain_toggled() less error-prone.
Don't assume that "toggled" signal means that toggle status actually
changed.

Though issue #3133 got fixed with my previous commit, let's make sure we
never create several GBinding for the same GimpChain by always checking
existence of a previous one after a "toggled" signal.
Also only create a GBinding object if one doesn't already exist.
2019-03-20 15:05:22 +01:00
Jehan af6760b3c9 app: fixes g_object_unref: assertion 'G_IS_OBJECT (object)' failed.
"binding" data can be set to NULL. Do not assume it is a proper object.

Also I was tempted to use g_object_set_data() to simply free the
GBinding object on setting a new data, but such object will also be
freed when the widget is destroyed by default. So that would also end up
in double destruction. Instead just keep current logics.

This CRITICAL was reported in #3133 but this is not the main bug.
2019-03-20 14:06:18 +01:00
Michael Natterer 39406b83d3 Issue #2136 - On-image UI for adjusting Linear Motion Blur
Add on-canvas GUI (simple lines) for circular, linear and zoom motion
blur. The restrictions in the interaction show pretty well that there
is room for improvement here, the line is just a bit too generic, but
it's better than nothing.
2019-01-04 14:38:49 +01:00
Michael Natterer 0a1ecdf4ee Issue #2540 - block width / height slider of the pixelize filter don't...
...have the same scaling

gimp_prop_widget_new_from_pspec(): when restricting the scale to the
actual op area for pixel-coordinate and pixel-distance properties,
only use the max value in the axis direction for pixel-coordinate; for
pixel-distance make sure we use the same value on both axes, simply
use MAX (area.width, area.height).
2019-01-03 22:19:48 +01:00
Ell 6976e87dac app: in prop-GUI, use "direction" UI-meta of angle props for dial
When constructing a prop-GUI widget for an angle property with a
dial, use the the property's "direction" UI-meta, if exists, to set
the direction of the dial.  Together with GEGL commit
7b0578073a0f20334b5a8a8fe57b649d9f302454, this fixes wrong dial
direction in certain ops that use clockwise angles.
2018-07-24 02:25:25 -04:00
Ell 0c477564ad app: in GimpDial, add "clockwise-angles" property ...
... and rename "clockwise" to "clockwise-delta"

Add a boolean "clockwise-angles" property to GimpDial, which, when
set, causes the dial legs' angles to be measured clockwise, rather
than counter-clockwise.  The property is FALSE by default.

Rename the "clockwise" property, which controls the direction of
the measured delta between the two angles, to "clockwise-delta", to
avoid confusion, and adapt the rest of the code.
2018-07-24 02:25:22 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 6d8128e3e0 app: fix filename in gimppropgui-recursive-transform.c license notice 2018-06-17 15:59:11 -04:00
Ell 56d15e83e9 app: merge back gegl:recursive-transform-plus propgui to recursive-transform
... following GEGL commit 6be0a86583f9c10c7710c96c21c261e4227c4727.

gegl:recursive-transform now allows applying multiple
transforamtions simultaneously, using multiple transform-grid
widgets.
2018-06-17 15:49:35 -04:00
Ell 99828a697a app: add custom GUI for gegl:recursive-transform-plus
gegl:recursive-transform-plus is an extension of
gegl:recursive-transform, allowing multiple transformations to be
applied simultaneously; it will eventually be merged back into
gegl:recursive-transform.  See GEGL commit
9829bc22e85526d789c4e80c05949d4c6202a207.

The GUI uses the new TRANSFORM_GRIDS controller, allowing adding,
duplicating, and removing transformations, and controlling them
through on-canvas transform grids.
2018-06-05 04:31:30 -04:00
Ell 5e953ece85 app: add TRANSFORM_GRIDS propgui controller
... which is similar to the TRANSFORM_GRID controller, supporting
multiple transformation matrices.

Implement the TRANSFORM_GRIDS controller in GimpFilterTool, using
the new GimpToolWidgetGroup to display multiple transform grids.
2018-06-05 04:04:47 -04:00
Michael Natterer 4cd19e6f65 app: undeprecate everything in propgui/, mostly table -> grid 2018-05-20 21:06:32 +02:00
Michael Natterer 6c8cf7876a Replace lots of deprecated gtk_menu_popup(), only GimpUIManager left 2018-05-20 21:06:30 +02:00
Michael Natterer 1b3135ca95 Get rid of using GtkMisc API globally 2018-05-20 21:06:30 +02:00
Ell 07c81abf01 app: fix propgui random seed generation
After the switch of random-seed properties from INT to UINT, their
upper bound results in a negative value when converted to a
gint32, causing a CRITICAL in the call to g_random_int_range().
Use g_random_double_range() instead, which has enough precision to
accurately represent all values in the range, and round the result.
2018-05-04 13:41:55 -04:00
Ell 5b8b33dad7 app: invert zoom mapping in gegl:panorama-projection gyro controller 2018-04-11 04:53:26 -04:00
Ell 6982533292 app: add custom GUI for gegl:panorama-projection
... which uses a gyroscope controller to control the op's rotation
angles and zoom.
2018-04-10 10:18:49 -04:00
Ell 8738d2f22b app: add a gyroscope controller to prop-gui
Add a gyroscope controller, providing a prop-gui interface to
GimpToolGyroscope.

Implement the gyroscope controller in GimpFilterTool.
2018-04-10 10:18:48 -04:00