Which replaces all the deparate functions to turn layers, channels,
layer masks and vectors into selections. Use the new virtual function
all over the place instead of calling the functions in
gimpchannel-select.c manually.
Description of undo actions should be marked as action descriptions,
and not as commands. This is required for translation for some
language (like Hebrew) that require a different grammatical tense for
describing actions
gimp_drawable_get_mode_node() was calling gimp_drawable_get_node()
instead of gimp_item_get_node() if the mode_node didn't already exist.
Fortunately that was never the case i nthe current code. Added
warnings in the GimpItem::get_node() impls that would go off in such a
situation.
this is pretty pointless from an abstraction point of view, but using
these functions will make the code a lot more readable by getting rid
of tons of ugly casts to and from GimpViewable whenever getting an
item's parent.
* app/core/gimpdrawable.[ch]: add "gboolean push_undo" to
GimpDrawable::convert_type().
* app/core/gimpdrawable-convert.[ch]: same here for the gray and rgb
conversion functions.
* app/core/gimpchannel.c
* app/core/gimplayer.c: pass FALSE when called from GimpItem::convert()
because it can be called on unattached items only.
* app/core/gimpimage-convert.c: pass TRUE.
* app/core/core-enums.[ch]
* app/core/gimpgrouplayerundo.[ch]
* app/core/gimpimage-undo-push.[ch]: add GIMP_UNDO_GROUP_LAYER_CONVERT
which simply calls gimp_drawable_convert_type() with the old type
when undone/redone.
* app/core/gimpgrouplayer.c: push a group layer convert undo so this
can be properly undone/redone.
The new functions reall convert the drawable this time, using the
previously renamed convert_tiles functions. Remove tile manager
fiddling from all callers and leave it there only for converting to
indexed.
Rename them from gimp_drawable_convert_foo() to
gimp_drawable_convert_tiles_foo() because they don't convert the
drawable itself, they convert its tiles into passed-in tiles.
* app/core/gimpitem.[ch]: add virtual function ::get_container() plus
pubic API wrapper which returns the children of the item's parent
viewable, or the right toplevel container of its image.
Add utility function get_index() which returns the item's index
within its container.
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: implement get_container() and return
the right image container.
* app/core/gimplayer.[ch]: same here, and remove previously added
public get_container() API.
* app/core/gimplayermask.c
* app/core/gimpselection.c: implement get_container() for these GimpChannel
subclasses and return NULL.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-12-08 Sven Neumann <sven@gimp.org>
* app/core/gimpchannel.c
* app/core/gimpdrawable-operation.c
* app/core/gimpdrawablestack.c
* app/core/gimpimage.c
* app/core/gimpimagemap.c
* app/core/gimplayer.c
* app/core/gimpprojection.c: gegl_node_add_child() and
gegl_node_remove_child() are public API in GEGL now.
svn path=/trunk/; revision=27770
2008-11-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: add optional parameter "PixelRegion
*destPR" to GimpDrawable::apply_region().
* app/core/gimpdrawable-combine.[ch]: if the passed destPR is !=
NULL, write the result of the combination into that region instead
of the drawable's tiles. The region must have the exact size of
the result.
* app/core/gimp-edit.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-shadow.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore.c: pass NULL as destPR. Code actually
using this feature follows.
svn path=/trunk/; revision=27574
2008-11-08 Michael Natterer <mitch@gimp.org>
Abstract the legacy projection code away into a virtual function
of GimpDrawable:
* app/core/gimpdrawable.[ch]: add new virtual function
GimpDrawable::project_region() which projects an area of a
drawable onto a passed in PixelRegion.
* app/core/Makefile.am
* app/core/gimpchannel-project.[ch]
* app/core/gimplayer-project.[ch]: new files which implement it.
* app/core/gimpchannel.c
* app/core/gimplayer.c: hook it in.
* app/core/gimpprojection-construct.c: get rid all the projection
code moved to above new files and project all drawables in one
loop.
* app/core/gimpprojectable.[ch]: remove the legacy methods
get_colormap() and get_components(), they are not needed any
longer.
* app/core/gimpimage.c: changed accordingly.
svn path=/trunk/; revision=27571
2008-11-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch] (gimp_drawable_set_tiles): add
"GimpImageType type" parameter because there are only a few calls
to this function which (can easily pass the current type); however
most calls to gimp_drawable_set_tiles_full() were just using the
function because of the type argument and passed in the item's
current offsets (which means peeking into the item struct or using
temp variables).
* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
* app/text/gimptextlayer.c (gimp_text_layer_render)
* app/tools/gimptransformtool.c (gimp_transform_tool_doit): pass
the type to set_tiles().
* app/core/gimpchannel.c (gimp_channel_convert)
* app/core/gimpimage-convert.c (gimp_image_convert)
* app/core/gimplayer.c (gimp_layer_convert,add_alpha,flatten):
change calls to set_tiles_full() into set_tiles() because the
offset doesn't change.
svn path=/trunk/; revision=27535
* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.
* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.
* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.
* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h
svn path=/trunk/; revision=27521
2008-10-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: add a default implementation of
GimpDrawable::get_node() which contains a layer mode node.
Implement GimpItem::visibility_changed() and turn the node into a
nop when the drawable is invisible. Added public function
gimp_drawable_get_mode_node() so subclasses can plug stuff
into its "aux" pad.
* app/core/gimplayer.[ch]
* app/core/gimpchannel.[ch]: changed accordingly (remove
duplicated member and code that is now in GimpDrawable).
svn path=/trunk/; revision=27277
2008-10-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]: add a projection node and
implement GimpDrawable::get_node(). Reconfigure the node in
visibility_changed(), set_color(), set_opacity() and
set_show_masked().
* app/core/gimpimage.c (gimp_image_get_graph): enable code that
projects the channels stack on top of the layer stack.
* app/core/gimpprojection-construct.c: remove the call to
gimp_projection_construct_channels() from the GEGL code path. Also
don't touch proj->construct_flag.
svn path=/trunk/; revision=27230
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
* app/core/gimpchannel.c (gimp_channel_real_all): We don't want to
clear the region, we want to fill it with OPAQUE_OPACITY.
svn path=/trunk/; revision=26891
2008-09-01 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.[ch]: added clear_region().
* app/base/tile-manager-crop.c
* app/core/gimpchannel.c
* app/core/gimpimage-merge.c
* app/core/gimpmaskundo.c
* app/core/gimpprojection-construct.c: use it instead of calling
color_region() with a zero color.
svn path=/trunk/; revision=26826
2008-07-23 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore-stroke.[ch]: also implement brush
dynamics emulation for stroking selections.
* app/core/gimpchannel.c: pass the 'emulate-dynamics' parameter
to
gimp_paint_core_stroke_boundary().
svn path=/trunk/; revision=26293
2007-12-06 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore-stroke.[ch]: added GError arguments and
fixed all functions to abort when the first call to
gimp_paint_core_start() fails (it won't succeed either for the
next path or whatever segemts).
* app/core/gimpitem.[ch]: added GError to gimp_item_stroke()
* app/core/gimpselection.c
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: don't gimp_message() in
GimpItem::stroke() but set the error.
* app/dialogs/stroke-dialog.c
* app/actions/vectors-commands.c
* app/actions/select-commands.c: handle the returned errors.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/paint_tools.pdb: pass the error to the stroke
functions.
* app/pdb/paint_tools_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c: regenerated.
svn path=/trunk/; revision=24273
2007-03-05 Michael Natterer <mitch@gimp.org>
Makes default Select -> Border behaviour consistent, and makes
'sticky image edges' optional by adding a checkbox in the Border
Selection dialog. Patch by Martin Nordholts. Fixes bug #350009.
* app/actions/select-commands.c (select_border_cmd_callback)
(select_border_callback): Added edge-lock checkbox to dialog and
modified calls accordingly.
* app/paint-funcs/paint-funcs.c (border_region)
(compute_transition): Fixed algorithm. (compute_transition is a
helper function to the algorithm). Also clarified many parts of
the algorithm with comments.
* app/paint-funcs/paint-funcs.h
* app/core/gimpchannel.[ch]
* app/core/gimpselection.c: Added gboolean edge_lock to function
calls/signatures.
* app/pdb/selection_cmds.c: Regenerated.
svn path=/trunk/; revision=22047