Commit Graph

71 Commits

Author SHA1 Message Date
Jehan 979acaaae2 app, libgimp*: commit the newly generated *enums.c files.
They are nearly the same as initially, except that now they include an
intermediate stamp header which will be generated by the build system.

The only 2 enums which don't need these includes (and are not versioned)
are libgimp/gimpenums.c and libgimpthumb/gimpthumb-enums.c.
2022-08-01 20:00:01 +02:00
Anders Jonsson 2bb2c8949b app: fix typo in name of lens mode enum 2022-02-13 13:49:36 +01:00
Jehan 35cef54899 app: fix handling multi-drawables selected in bucket fill tool.
We were getting a critical when selecting multiple drawables (either
changing layer selection while the tool is ON, or starting with multiple
selection). We should not have assert code here, just handle the case
gracefully with a normal error message when trying to fill on several
layers at once.
2022-02-09 00:27:04 +01:00
Jehan 9f6fbe8aca app: fix generated tool-enums.c and deactivate Paint Select tool…
… checkbox in Preferences when GEGL operation "gegl:paint-select" is
missing.

Otherwise the tool won't appear and you don't understand why.
2020-11-24 21:26:04 +01:00
Thomas Manni e1cdb9f54e app, icons: add Paint Select tool in the playground
A -quick done- first step towards the addition of a smart selection tool.
Require the gegl:paint-select workshop operation.
Still LOT of work to do (wip):
- fluctuations removal (GEGL side)
- multilevels pyramid approach + banded graphcut for instant result on large
   image (GEGL ? GIMP ?)
- Gaussian Mixtures for color models (GEGL side)
- drawable offsets (GIMP side)
- undo / redo (GIMP side)
- scribbles edition mode (GIMP side)
- dedicated icons
- ...
2020-11-24 12:10:40 +01:00
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 e4990bee7b 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.
2019-08-11 00:28:44 +03:00
Jehan 771d415b5f app: rename "On color" matting preview mode to "Color".
As discussed earlier with mitch and tmanni.
2019-07-25 22:44:41 +02:00
Thomas Manni d6bcb16b0b Foreground-select Tool: new Preview Mode and color selector for "On color" preview
This commit adds a new preview called "Grayscale", allowing to see the
resulting mask in black and white. The previous preview is now called
"On color" and allow users to choose the color and opacity, instead of
imposing only 4 colors (red, green, blue, grey).
2019-06-18 17:59:41 +02:00
Jehan c71b4916af app: add the concept of line art source to Bucket Fill tool.
Additionally to sample merge and active layer, now we can only use the
layer above or below the active layer as line art source.

The line art fill is meant to work on drawing lines. Though sample merge
still is ok in many cases, the more you fill with colors, the more the
line art computation becomes unecessarily complex. Also when you use a
lot of layers with some of them already filled with colors, it makes it
impossible to colorize some line art zones with the tool. Moreover you
just don't want to have to hide every layers out there to colorize one
layer (especially background layers and such as you may want to see the
result with your background).
Thus we want to be able to set the source as a unique layer, while it
not being necessarily the active one (because you want lines and colors
on different layers). In this case, I am assuming that the color and the
line layers are next to each other (most common organization).
2019-01-15 16:06:50 +01:00
Michael Natterer 368f2e596a app, libgimpbase: move enum GimpBucketFillArea to the core
The whole bucket fill specific enum stuff is on its way out, so let's
keep this one out of libgimp for now until we decide how to present
line art filling in the PDB.
2019-01-02 15:47:31 +01:00
Ell 2085cb4a37 app: s/GEGL_WARP_BEHAVIOR/GIMP_WARP_BEHAVIOR/
The enumerators of the GimpWarpBehavior enum, except for MOVE, had
a GEGL_ prefix, rather than a GIMP_ prefix, for some reason.

Change all of them to GIMP_.
2018-12-12 11:23:33 -05:00
Michael Natterer dd30cc79b5 app: let tools control how they recieve modifier keys during a stroke
Add new enum GimpToolActiveModifiers { OFF, SAME, SEPARATE } and
new API gimp_tool_control_set,get_active_modifiers(), the default
value is OFF.

OFF: the tool gets no modifier keys at all during a stroke

SAME: all modifiers are always delivered via GimpTool::modifier_key(),
and no magic is applied whatsoever when a mouse button is pressed or
released.

SEPARATE: this is the "classic" way: modifiers while hovering and
while stroking are delivered separately, and hover modifiers don't
affect stroke modifiers.
2017-10-29 16:42:53 +01:00
Michael Natterer 6e2e8a6f08 app: move the rectangle tool enums from tools-enums to display-enums 2017-06-24 19:48:09 +02:00
Michael Natterer 3ab92c7290 app: add GimpToolWidget subclass GimpToolPath, a complete vectors editor 2017-06-21 23:27:20 +02:00
Michael Natterer 6bd316e070 app: add new GimpToolTransformGrid subclass GimpToolHandleGrid
which implents the handle transform tool's interaction.
2017-06-19 01:21:06 +02:00
Michael Natterer 53a84bc6ea app: move enums GimpButtonPressType and GimpButtonReleaseType
from tools-enums.h to display-enums.h, will need them there soon.
2017-06-10 12:25:16 +02:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04:00
Michael Natterer 81cf8aa601 app: improve usability of the handle transform tool
Reorganize tool modes to be { ADD_TRANSFORM, MOVE, REMOVE }, where
ADD_TRANSFORM is the default and allows to add handles *and* transform
the image in one click-drag. MOVE moves handles without transforming
(shift) and REMOVE removes handles (control). Also improve cursors to
accurately show the result of a click.
2015-04-02 23:31:41 +02:00
Johannes Matschke 2989bad35a Bug 721009 - new transform tool with freely placeable handles
Add new tool GimpHandleTransformTool which allows to freely place up
to 4 handles on the image, then move any one of them, which transforms
the image so that the remaining handles keep their position.

Did quite some cleanup on the code before pushing --Mitch
2015-03-05 12:36:59 +01:00
Michael Natterer e2628b9bd0 app: revive gimpdrawable-foreground-extract
Move the extraction graph from the foreground select tool there.
Enable the PDB wrapper again, using default values for now.
Some sytle cleanup in the foreground select tool.
2014-06-03 23:05:23 +02:00
Michael Natterer 88e4d7e468 app: commit ongoing tool operations on tool change instead of cancelling
On tool change, we used to simply halt tools before switching to the
new one, which meant losing ongoing live-previewed tool changes, like
transforms, warps and color corrections. This change makes them being
applied to the image instead before switching to the new tool:

Add enum value GIMP_TOOL_ACTION_COMMIT that is passed to
GimpTool::control() before tool switching. Handle the new enum value
in all tools, and actually commit the previewed stuff. This changes
the behavior of GimpCageTool, GimpImageMapTool, GimpTransformTool and
GimpWarpTool.
2014-04-04 22:34:26 +02:00
Michael Natterer 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
Michael Natterer a328f9d305 app: shorten enum GimpMattingEngine's value names
and reorder code in GimpForegroundSelectOptions to match the order of
properties.
2013-06-03 23:11:39 +02:00
Michael Muré d6ed13ef6c GimpWarpTool: skeleton of the tool, with options 2013-05-21 23:28:40 +02:00
Miroslav Talasek b893993e7b app: add new enums GimpMattingDrawMode and GimpMattingEngine 2013-05-07 23:09:55 +02:00
Michael Natterer 314717f4bb app: clean up GimpTransformOptions' preview controls
Turn the "Preview type" combo into a simple "Show image" toggle and
enable the "No guides" choice in the guides combo. Remove unused enum
GimpTransformPreviewType. This way the preview and guide/grid controls
are strictly separate and much less confusing.
2011-07-27 23:15:02 +02:00
Michael Natterer 43788feb50 app: remove enum GimpTransformGridType
and use the two new values from GimpGuidesType instead.
2011-07-24 18:01:21 +02:00
Michael Natterer 0dcdfe9e80 app: move enum GimpRectangleGuide from tools/ to display/
and rename it to enum GimpGuidesType.
2011-05-20 19:41:48 +02:00
Michael Natterer 33a8c15403 app: large scale formatting cleanup in the new cage code
- move enum to the new gimp-gegl-enums.[ch]
- clean up includes
- spacing
- indentation
- coding style
2010-11-04 22:16:27 +01:00
Alexia Death d2563a69fd app: Cleanup in preparation of merge 2010-11-04 20:27:11 +02:00
Martin Nordholts c33b287dab app: Register GimpToolAction for gimp_enum_get_value_name()
Register GimpToolAction so we can use gimp_enum_get_value_name() on
it.
2010-10-26 14:23:08 +02:00
Nelson A. de Oliveira c4588f1209 Bug 575911 - Add 'Rule of fifths' crop guide overlay
Implement a rule of fifths guideline for GIMP. See
http://markhancock.blogspot.com/2006/03/address-basic-composition.html
for more info.
2010-06-24 08:37:09 +02:00
Michael Natterer e170ad77b1 Remove the newly added tool clipboard facility again, we don't need it 2009-06-24 19:08:24 +02:00
Michael Natterer 0f55bf15bc Enable cut/copy/paste for the text tool
* app/tools/tools-enums.[ch]: add enum GimpClipboardAction which can be
{ CUT, COPY, PASTE }

* app/tools/gimptool.[ch]
* app/tools/tool_manager.[ch]: add GimpTool::clipboard_action() which
returns a boolean indicating whether the tool handled the action.

* app/tools/gimptexttool.c: implement clipboard_action().

* app/actions/edit-commands.c: try the active tool first in the cut,
copy and paste callbacks.
2009-06-21 23:37:18 +02:00
Michael Natterer 1a16b48c93 Add infrastructure for sending double and triple clicks to tools
* app/tools/tools-enums.[ch]: add enum GimpButtonPressType which can
be { NORMAL, DOUBLE, TRIPLE }

* app/tools/gimptool.[ch]: add press_type paramater to GimpTool::button_press()

* app/tools/gimp*tool.c
* app/tools/tool_manager.[ch]: changed accordingly.

* app/tools/gimptoolcontrol.[ch]: add members and API so tools can choose
to receive double and triple clicks.

* app/display/gimpdisplayshell-callbacks.c (gimp_display_shell_tool_events):
dispatch double and triple clicks to tools if they want them, and if they
became active by the preceding normal button press.
2009-06-20 17:37:31 +02:00
Sven Neumann 2e7c80384b Bug 566443 – diagonal method guidelines for crop tool
2009-03-14  Sven Neumann  <sven@gimp.org>

	Bug 566443 – diagonal method guidelines for crop tool

	* app/tools/tools-enums.[ch]
	* app/tools/gimprectangletool.c 
(gimp_rectangle_tool_draw_guides):
	applied a slightly modified patch from Lukasz Hladowski, based 
on
	a patch from Tim Jedlicka. This adds diagonal guidelines as
	described by Edwin Westhoff to the rectangle tools.


svn path=/trunk/; revision=28156
2009-03-14 12:59:34 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: 
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: micro-optimization in the 
generated
	enum registration code.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27538
2008-11-03 21:38:13 +00:00
Sven Neumann f1196fd405 added missing file.
2008-04-07  Sven Neumann  <sven@gimp.org>

	* app/gegl/Makefile.am (libappgegl_a_SOURCES): added missing 
file.

	* app/tools/tools-enums.c: regenerated.


svn path=/trunk/; revision=25404
2008-04-07 20:56:03 +00:00
Martin Nordholts 4fee7a4e0e Ported the internal representation of the rectangle to gdouble:s instead
2007-11-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.[ch]: Ported the internal
	representation of the rectangle to gdouble:s instead of
	gint:s. This solves problems like not being able to swap portrait
	for landscape on very small rectangle and bug #442027, as well as
	provides a nice base to solve other similar problems when they are
	discovered. It is possible to choose what precision the
	GimpRectangleTool:s will appear to have externally through a new
	GimpRectanglePrecision enum and property, but the gdouble
	precision mode still requires some work in order to be useful. In
	the processes quite some refactoring has taken place, mostly
	restructuring code and splitting larger functions into smaller
	more managable ones.
	(gimp_rectangle_tool_rect_rubber_banding_func)
	(gimp_rectangle_tool_setup_snap_offsets)
	(gimp_rectangle_tool_apply_fixed_rule)
	(gimp_rectangle_tool_update_int_rect)
	(gimp_rectangle_tool_get_public_rect): New helper functions.

	* app/tools/tools-enums.h: Added GimpRectanglePrecision.

svn path=/trunk/; revision=24224
2007-11-24 09:09:26 +00:00
Martin Nordholts 6f2171375b Update rectangle tool options to bring it closer to the spec. The major
2007-08-04  Martin Nordholts  <martinn@svn.gnome.org>

	Update rectangle tool options to bring it closer to the spec. The
	major change is the use of a 'Fixed:' check box and a 'Aspect
	ratio/Width/Height/Size' combo box. The check box is togglable
	with Shift while rubber-banding.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_active_modifier_key): Set other side also
	when Shift is released.
	(gimp_rectangle_tool_update_options): Don't supress updates of
	tool options on fixed width/height/size
	(gimp_rectangle_tool_apply_fixed_height)
	(gimp_rectangle_tool_update_with_coord)
	(gimp_rectangle_tool_handle_general_clamping): Use new tool option
	interface and members.

	* app/tools/gimprectangleoptions.[ch]
	(gimp_rectangle_options_iface_base_init)
	(gimp_rectangle_options_install_properties)
	(gimp_rectangle_options_(get|set)_property): Remove and add
	relevant properties.
	(gimp_rectangle_options_private_finalize): Unref the new widgets
	used in tool options.
	(gimp_rectangle_options_fixed_rule_changed): New, update tool
	options depending on current option state.
	(gimp_rectangle_options_gui): Modified according to change log
	entry summary.
	(gimp_rectangle_options_unparent_fixed_rule_widgets): New helper.
	(gimp_rectangle_options_fixed_rule_active): New, clients should
	use this to find out if a certain fixed-mode is active.

	* app/tools/tools-enums.[ch]: Added GimpRectangleToolFixedRule.

svn path=/trunk/; revision=23114
2007-08-04 20:20:44 +00:00
Michael Natterer 55c9c20843 added value GIMP_BUTTON_RELEASE_NO_MOTION.
2007-03-10  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-enums.[ch] (enum GimpButtonReleaseType): added
	value GIMP_BUTTON_RELEASE_NO_MOTION.

	* app/tools/gimptool.[ch]: when click events are requested and the
	click was too long for a "click" event, send a NO_MOTION event if
	the pointer didn't move at all.

	* app/tools/gimpbucketfilltool.c: treat NO_MOTION as tool
	confirmation too.

	* app/tools/gimpfreeselecttool.c: request click events and treat
	both CLICK and NO_MOTION as tool confirmation.

	* app/tools/gimprectangletool.c: ignore NO_MOTION.


svn path=/trunk/; revision=22091
2007-03-10 15:07:56 +00:00
Michael Natterer d7ed63948c Step one towards enabling tool cancellation by other means than mouse
2007-02-27  Michael Natterer  <mitch@gimp.org>

	Step one towards enabling tool cancellation by other means than
	mouse button 3 and towards proper "clicked" semantics.

	* app/tools/tools-enums.[ch]: added enum GimpButtonReleaseType
	which can be one of { NORMAL, CANCEL, CLICK } (click is curently
	unused).

	* app/tools/gimptool.[ch] (GimpTool::button_release): added
	"release_type" parameter.

	(gimp_tool_button_release): if the state contains
	GDK_BUTTON3_MASK, call the tool's button_release() with CANCEL,
	use NORMAL otherwise.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c (button_release): added
	"release_type" parameters and get rid of own checks for
	GDK_BUTTON3_MASK.


svn path=/trunk/; revision=22015
2007-02-27 18:55:12 +00:00
Michael Natterer fc761f6ed5 remove enum GimpColorPickMode...
2007-02-07  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-enums.[ch]: remove enum GimpColorPickMode...

	* app/widgets/widgets-enums.[ch]: ...and add it here.

	* app/widgets/gimpgradienteditor.c: merge separate functions for
	picking FG and BG colors and update the new color area from the
	merged function.


svn path=/trunk/; revision=21863
2007-02-07 17:53:16 +00:00
Sven Neumann 532089a794 added missing define GIMP_TYPE_RECTANGLE_CONSTRAINT. Removed unused
2006-12-13  Sven Neumann  <sven@gimp.org>

	* app/tools/tools-enums.[ch]: added missing define
	GIMP_TYPE_RECTANGLE_CONSTRAINT. Removed unused descriptions.

	* app/tools/gimprectangletool.c: made "constraint" an enum
property.
2006-12-13 21:49:09 +00:00
William Skaggs 13db753398 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/tools-enums.[ch]: change labels for transform
	type enum.

	* app/tools/gimpmoveoptions.c:
	* app/tools/gimptransformoptions.c:  change "Affect:" to
	"Move:" or "Transform:", respectively.  Fixes bug #358824.
2006-10-03 19:32:41 +00:00
William Skaggs 5e9dc3c0d8 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/tools-enums.[ch]: add GimpRectangleConstraint
	enum.

	* app/tools/gimprectangletool.[ch]: replace "constrain"
	boolean with "constraint" enum property.  Implement
	constraints in motion handler -- the implementation
	is rather elegant but pretty tricky.

	* app/tools/gimpcroptool.c: constrain to image bounds,
	or to active drawable bounds if "current layer only"
	option is checked.

	* app/tools/gimpellipseselecttool.c
	* app/tools/gimprectangleselecttool.c: no constraint.

	This addresses bug #353936 -- I would say fixes it, but it
	probably needs some fine-tuning.  Also perhaps fixes
	bug #329817 a bit better than before.
2006-09-06 22:51:54 +00:00
William Skaggs c28e8253d4 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/tools-enums.[ch]: remove GimpCropMode enum;
	missed in previous commit.
2006-09-06 15:59:11 +00:00
Karine Delvare 23f86e93b8 added GimpRectangleGuide enum.
2006-06-05  Karine Delvare  <edhel@gimp.org>

	* app/tools/tools-enums.[ch]: added GimpRectangleGuide enum.

	* app/tools/gimpcropoptions.c
	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.c: added GimpRectangleGuide option to
	draw guides inside the rectangle. Fixes bug #323669.
2006-06-05 18:50:13 +00:00