Commit Graph

144 Commits

Author SHA1 Message Date
c3d37140eb Issue #1833 - (gimp-context-get-gradient-repeat-mode) always warns...
...and successfully fails

Commit d2ad2928 removed "gradient-repeat" from GimpPaintOptions, not
considering that it is also used in the PDB.

Move "gradient-repeat" from GimpGradientOptions back to
GimpPaintOptions, and add a comment that it is only used by the
gradient tool, not for painting.
2018-07-12 11:39:42 +02:00
5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
8195a56261 app, plug-ins: move GIMP_BRUSH_MAX_SIZE to gimpbrush-header.h
and use it in the brush file plug-ins.
2018-07-06 12:31:06 +02:00
80c423ae40 app: move the improved paint property copying code to GimpPaintOptions
and remove the old brush, dynamics, gradient property copying
functions.
2018-06-29 13:12:01 +02:00
cb0e6c65d0 Issue #1714 - When GIMP starts, default brush hardness is always at 100
We should not have essential signal connections (such as setting tool
options from brush properties) implemented in the tool options GUI
files, because they are not active until the options GUI is created.
Also, that magic is simply too hidden in the options GUI files.

Move the signal connections and the brush property copying code to
gimppaintoptions.c where is can also be done cleaner.

However, this must only be done for the main tool options instance
that is used for the GUI. Therefore, add a "gui_mode" boolean to
GimpToolOptions and set it to TRUE for all main tool options.

(this is ugly, but much less ugly and much less hidden than all the
places where code lives (like tool_manager.c) that can now be moved
into GimpToolOptions and its subclasses, and implemented cleanly
there).
2018-06-26 00:30:12 +02:00
b0beb0197a Bug 795230 - Rename Blend tool and provide PDB compatibility
Rename the tool and its options, and the gradient sub-struct of paint
options.
2018-04-14 00:52:20 +02:00
bf49b47620 Bug 795207 - Add color space to blend(gradient) tool options
First WIP commit, adds:

- enum GimpGradientBlendColorSpace { RGB_PERCEPTUAL, RGB_LINEAR }
- linear blending mode for gradient segments
- tool options GUI for the blend and paint tools which use gradients
2018-04-13 22:33:16 +02:00
4df282a6fb app: fix a typo (realtive) 2017-12-23 00:13:18 +01:00
Ell
eded91e118 Bug 753412 - New Canvas rotation feature rotates brush.
Replace the "lock brush size to zoom" paint option with a "lock
brush to view" option, which links the entire brush transform to
the view transform, so that the brush remains invariant in display
space under scaling, rotation, and reflection.
2017-12-22 17:52:29 -05:00
Ell
a0b73420ec app: add support for brush reflection
Add support for reflecting brushes as part of their transformation.
The reflection is performed as the last step of the transformation,
across the vertical axis.

The option to reflect the brush is not exposed in the UI, or
through the PDB, but is intended to be used for linking the brush
transformation to the view transformation, in the next commit.
2017-12-22 17:52:29 -05:00
ab56f524e4 app: "Reset to default values" does not properly reset generated...
... brush features.
My previous commit only fixed aspect ratio reset, but I realize that
much more brush options are affected by defaults of generated brushes
(size, hardness, aspect ratio, angle and spacing). Let's reset all these
after the basic property reset.
2017-05-04 04:59:59 +02:00
129a0e4bcd app: "Reset to default values" does not properly reset aspect ratio.
Generated brushes can have specific aspect ratio, hence resetting to
fixed property defaults may be wrong. Therefore GimpPaintOptions needs
to redefine the reset() method from GimpConfigInterface.
Note: the specific "Reset aspect ratio to brush's native aspect ratio"
button was alright. But the broader "Reset to default values" was not.
2017-05-04 04:57:42 +02:00
Ell
d4bb12d8b8 app: fix painting with force == 0
Should be a nop, but instead does the same thing as force == 0.5.
2017-04-10 09:57:54 -04:00
a1b844897c app: make GimpPaintOptions' "use-applicator" default to FALSE again 2017-01-21 00:29:41 +01:00
0bc45c8cd0 app: default to use gegl applicator in paint tools
Temporarily slower - but permits paint modes like overlay/softlight to work at
all for linear TRC pixel encodings. Should be reverted when the non-graph
approach works properly again.
2017-01-12 18:55:38 +01:00
184f0929ce Bug 771678 - Parametric Brush Aspect Ratio and Angle values...
...are not submitted to respective Tool Options sliders

Treat brush angle and aspect ratio like all other paint options values
that can be linked to brush defaults and take their default values
from the brush. They were special casing their defaults to constants,
and GimpBrushGenerated was adding the passed dynamic radius and aspect
values to its own. This was totally incomprehensible.

Now GimpBrushGenerated's transform_size() and transform_mask()
implementations just translate between these APIs value ranges and the
brush's own value range and only use the passed values (not the
brush's native values), which makes the editor <-> tool options
interaction and the painted brush shape predictable.

Also connect the active brush's property notifications to the paint
options properties, so the paint options follow a brush edit live if
the respective "linked" toggles are checked.

And some cleanup.
2016-10-12 00:21:12 +02:00
e5b6806fe2 app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880.
2016-02-11 23:46:24 +01:00
dd171bbf0c Bug 760175 - paintbrush size not applied in python scripts in version 2.9
Remove the code that links size, spacing etc. to brush defaults from
the GimpPaintOptions class impl and add it to gimppaintoptions-gui.c
as a callback instead.

It's not a core thing and that magic with side effects should only be
applied to the GimpPaintOptions behind the tool options GUI.
2016-01-06 01:24:56 +01:00
93fdaa0597 Bug 731279 - Tool Preset Editor not working correctly
This (doesn't quite) fix an obscure part of the tool preset bugs: when
changing the brush on a GimpPaintOptions instance, we might or might
not change the brush size, aspect etc. to the set brush's native
values, possibly overwriting the intended values from a tool preset.

Implement GimpConfig::copy() and copy the affected values again after
the entire object has been copied, so we actually use the value of
gimp_config_copy()'s "source" object.

This would fix that particular tool preset problem if there wasn't
another bug that is still unfixed, stay tuned...
2015-10-14 23:02:07 +02:00
5422646d91 Bug 750674 - Stroke selection doesn't honor brush size set in paint tool options
Implement GimpConfigInterface::duplicate() and after duplicating the
paint options, copy the brush-related properties again, because they
might have been changed by setting the brush on the copy (if they are
set to be linked to the brush's native values).
2015-06-14 20:43:45 +02:00
7449316898 app: add gimp_dynamics_is_output_enabled()
and use it to further simplify stuff. Almost no place needs to use a
GimpDynamicsOutput directly now.
2015-04-19 21:58:36 +02:00
b0dbb2edf2 Bug 741200 - paint options spacing differs from brush spacing
Add "link" buttons to the tool options that are duplicates of brush
properties, so the tool options values can be set to change along with
the current brush.
2015-01-11 23:20:31 +01:00
a101ed2aef app, pdb: change range of brush-spacing to 0.01..5.0
And only use percent in the GUI.
2014-11-17 23:56:16 +01:00
7c2e226566 app: simplify logic in gimp_paint_options_get_brush_mode() 2014-11-17 23:35:10 +01:00
548df1fa32 app: change brush-hardness and brush-force range to [0.0..1.0]
and set a factor of 100 on the GUI.
2014-11-17 23:17:13 +01:00
c9e75b1fa0 app: some cleanup in the new paint options code 2014-11-17 21:45:01 +01:00
32e545277b app: fixes for force and hardness 2014-11-17 15:24:59 +02:00
4421070a6a app: add explicit paint options sliders for hardness and force 2014-11-17 13:13:18 +02:00
6ef522b38b app: fix spacing to copy between paint tools 2014-11-17 00:03:15 +02:00
9a953a9239 app: locking brush size to zoom 2014-11-17 00:03:10 +02:00
7f6cdf635a Revert "app: apply a cap on brush scaling"
This reverts commit 5a22fb5799.
2014-11-15 22:25:59 +02:00
5a22fb5799 app: apply a cap on brush scaling 2014-11-15 21:56:51 +02:00
9f492273cb Revert "app: reorder spacing after size in the new spacing override code/ui"
This reverts commit 492e1ab560,
but keeps the code cleanups, and adds some more.
2014-11-13 00:37:19 +01:00
492e1ab560 app: reorder spacing after size in the new spacing override code/ui 2014-11-12 23:55:46 +01:00
0c6848e79e app: make spacing override part of paint options 2014-11-13 00:08:40 +02:00
ef85845372 app: add gimp_paint_options_set_default_brush_size()
and use it globally instead of two different methods, one of which was
forgotten to be ported to the new aspect ratio range where 0.0 means
1:1. Add a FIXME comment in paint_tools.pdb where I think setting the
default size is a bug, see #721249.
2014-01-04 15:48:34 +01:00
697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
741792875e app: add the GimpApplicator back for painting, but make its use optional
Default to using the new code. This is out of pure curiosity how
GEGL changes affect painting with a purely graph-based method.
2013-05-21 18:55:03 +02:00
f0a7d04cfa app: Fix a segfault in paint core 2012-02-09 21:59:25 +02:00
4300612962 app: separate handling of reverse-gradient from paint dynamics
because it belongs to the gradient and should be changed whenever the
gradient gets changed.

Introduce gimp_paint_options_copy_gradient_props() and call it at the
right places in the tool manager.
2011-12-06 22:39:29 +01:00
841c8a7ebe String review: fix some spelling and formatting issues 2011-08-28 20:07:55 +02:00
52cd1b9043 app: share brush modifiers along with the brush or dynamics 2011-06-02 21:17:52 +03:00
316c9fdd45 Reworded the Increment's tooltip
The tooltip for Increment option has a better wording now
at Alexia's suggestion.
2011-04-20 22:47:54 +04:00
3eee39c8fb Terminology fixes and missing tooltips
Options of brush-based tools now have clearer names,
and the options themselves now have tooltips that
had been missing.
2011-04-20 22:24:19 +04:00
6a3fe9f9c5 app: restore the original brush size upper limit of 10000
but restrict the tool options sclae to 500.
2011-04-18 21:10:47 +02:00
e3c0a4e549 app: move all GimpDynamics members to private 2011-03-03 18:43:56 +01:00
452819143a app: half-sane aspect ratio implementation 2011-01-25 23:28:02 +02:00
c29aefccc2 app: fix coding style in the new smoothing code 2011-01-08 22:18:56 +01:00
339deed1da app: Clean up smooth so it would be acceptable for master 2011-01-08 22:19:27 +02:00
082aa272a4 app: G-Pen algorithm for GIMP trunk. Now smoothing function works for Ink and Brush tools.
Rebased/fixed to go on top of current master. Next commit will add cleanup.
Had to change author tag because gnome is not accepting random stuff
in email fields. Original author is tarai, from gimp painter project
in sourceforge.
2011-01-08 22:17:26 +02:00