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.
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.
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
- ...
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.
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.
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).
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).
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.
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_.
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.
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.
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.
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
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.
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.
- 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
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.
* 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.
* 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-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
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
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-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-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-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-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
* 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.