Commit Graph

220 Commits

Author SHA1 Message Date
Michael Natterer 56b5909c8a add "GimpImageType type" parameter because there are only a few calls to
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
2008-11-03 20:51:46 +00:00
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c: regenerated.


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Martin Nordholts c3b7be242c Instantiate offset_node on-demand.
* app/core/gimpitem.c: Instantiate offset_node on-demand.

* app/core/gimpdrawable.c: Use gimp_item_set_offset().

svn path=/trunk/; revision=27530
2008-11-02 23:16:47 +00:00
Michael Natterer 5b68a1d0eb renamed gimp_item_offsets() to gimp_item_get_offset() and
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_offsets() to gimp_item_get_offset() and
	gimp_item_set_offsets() to gimp_item_set_offset().

	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/text/gimptextlayer-xcf.c
	* app/tools/<many>.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c
	* app/pdb/drawable-transform-cmds.c
	* app/pdb/selection-cmds.c
	* app/pdb/vectors-cmds.c
	* app/pdb/transform-tools-cmds.c: regenerated.


svn path=/trunk/; revision=27529
2008-11-02 23:03:29 +00:00
Martin Nordholts 594bc84ace New function that sets the offset of the item and also keeps the
* app/core/gimpitem.c (gimp_item_set_offsets): New function that
sets the offset of the item and also keeps the offset_node in
sync.

* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): Use the
function instead of setting the offsets directly. Fixes corrupted
display when cropping images with GEGL enabled for the projection.

svn path=/trunk/; revision=27528
2008-11-02 22:44:33 +00:00
Martin Nordholts 24fac1de0f Move the base GeglNode here in preparation for moving the GimpLayer
* 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-11-02 16:39:38 +00:00
Martin Nordholts a9e187586b Prefix the GIMP GEGL operations with "gimp:" instead of "gimp-" so we
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.

* app/tools/gimp*tool.c

* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.

svn path=/trunk/; revision=27512
2008-11-01 12:08:35 +00:00
Martin Nordholts e38ca5490a Rename the convenient channel offset defines from FOO_PIX to FOO as this
* app/base/base-types.h: Rename the convenient channel offset
defines from FOO_PIX to FOO as this increases readability.

* app/base/color-balance.c
* app/base/colorize.c
* app/base/desaturate.c
* app/base/hue-saturation.c
* app/base/siox.c
* app/base/threshold.c

* app/core/gimp-edit.c
* app/core/gimp-transform-region.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-convert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpdrawable.c
* app/core/gimpimage-convert.c
* app/core/gimpimage.c
* app/core/gimppalette-import.c
* app/core/gimppickable.c

* app/gegl/gimpoperation*mode.c
* app/gegl/gimpoperationcolorbalance.c
* app/gegl/gimpoperationcolorize.c
* app/gegl/gimpoperationhuesaturation.c
* app/gegl/gimpoperationlevels.c
* app/gegl/gimpoperationposterize.c
* app/gegl/gimpoperationthreshold.c

* app/paint-funcs/subsample-region.c

* app/paint/gimpclone.c
* app/paint/gimppaintbrush.c

* app/widgets/gimpviewrenderer.c: Adapt.

svn path=/trunk/; revision=27324
2008-10-19 13:47:09 +00:00
Michael Natterer 880a699cae configure.in require GEGL >= 0.0.21.
2008-10-14  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/sanity.c: require GEGL >= 0.0.21.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpimage.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer.c
	* app/gegl/gimp-gegl-utils.c
	* app/tools/gimpbrightnesscontrasttool.c: GEGL operation names
	are now "gegl:"-prefixed.

	* app/core/gimpimagemap.c: set the node's "dont-cache" property
	unconditionally.


svn path=/trunk/; revision=27284
2008-10-14 22:44:42 +00:00
Michael Natterer 5fa6af0e1f add a default implementation of GimpDrawable::get_node() which contains a
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-14 18:32:07 +00:00
Michael Natterer b479b7b346 add virtual function GimpDrawable::get_node() which returns a node to be
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add virtual function
	GimpDrawable::get_node() which returns a node to be plugged into
	the projection.

	* app/core/gimplayer.[ch]: remove public get_node() api and
	implement the virtual function instead.

	* app/core/gimpimage.c: changed accordingly.


svn path=/trunk/; revision=27211
2008-10-10 19:36:17 +00:00
Michael Natterer 73a9bcf327 Bug 554983 – Layers Projection using GEGL
2008-10-10  Michael Natterer  <mitch@gimp.org>

	Bug 554983 – Layers Projection using GEGL

	First projection using GEGL, wheeeee. Disabled by default because
	it doesn't work with floating selection (and will not, FS
	refactoring is in the queue).

	* app/core/gimpimage.[ch]: add gimp_image_get_graph() which
	returns a GeglNode representing the image's projection.

	(gimp_image_add_layer_node)
	(gimp_image_remove_layer_node): new utility functions to add and
	remove layer nodes to/from the graph.

	(gimp_image_add_layer)
	(gimp_image_remove_layer)
	(gimp_image_position_layer): call them to keep the graph up to date.

	* app/core/gimpdrawable.c (gimp_drawable_real_update): invalidate
	the source node.

	* app/core/gimpprojection.[ch]: keep a projection graph around and
	add gimp_projection_get_sink_node() which returns the node that
	writes to the projection tiles.

	* app/core/gimpprojection-construct.c: add
	gimp_projection_construct_gegl() which is a few-liner that uses a
	GeglProcessor to run the projection graph.

	(gimp_projection_construct): call the new function (disabled by
	default).


svn path=/trunk/; revision=27207
2008-10-10 12:24:56 +00:00
Michael Natterer 517e58cdeb Address Bug 554983 – Layers Projection using GEGL
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Address Bug 554983 – Layers Projection using GEGL

	* app/gegl/gimp-gegl-utils.[ch]: add (imcomplete) function
	gimp_layer_mode_to_gegl_operation() from bug #554983.

	* app/core/gimpdrawable.[ch]: add gimp_drawable_get_source_node()
	which returns a GimpOperationTileSource for the drawable's
	tiles.

	(gimp_drawable_real_set_tiles)
	(gimp_drawable_configure): set the node's "tiles" property.

	* app/core/gimplayer.[ch]: add gimp_layer_get_node() which returns
	a GeglNode with proxy "input" and "output" pads to be plugged
	into the projection graph. The node has children for opacity,
	mask, layer mode and layer offset.

	(gimp_layer_translate)
	(gimp_layer_add_mask)
	(gimp_layer_apply_mask)
	(gimp_layer_set_opacity)
	(gimp_layer_set_mode): reconfigure the respective nodes.

	* app/core/gimpimage.[ch]: keep a "graph" node around and destroy
	it in finalize(). Not even a stub, just a silly GEGL dependency.


svn path=/trunk/; revision=27204
2008-10-09 20:44:23 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
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
2008-10-09 20:24:04 +00:00
Michael Natterer e5be5664ed Move the shadow tiles from the image to the drawable. Fixes bug #100469.
2008-04-21  Michael Natterer  <mitch@gimp.org>

	Move the shadow tiles from the image to the drawable.
	Fixes bug #100469.

	* app/core/Makefile.am
	* app/core/gimpdrawable-shadow.[ch]: new files implementing
	the shadow tiles.

	* app/core/gimpimage.[ch]: remove the shadow tile manager from the
	GimpImage struct. Remove gimp_image_get_shadow_tiles() and
	_free_shadow_tiles().

	* app/core/gimpdrawable.[ch]: add the shadow tile manager
	here. Remove get_shadow_tiles() and merge_shadow(). Free the
	shadow tiles in finalize and when the drawable gets removed from
	the image.

	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-color-balance.c
	* app/core/gimpdrawable-colorize.c
	* app/core/gimpdrawable-curves.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-hue-saturation.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-operation.c
	* app/core/gimpdrawable-posterize.c
	* app/core/gimpdrawable-threshold.c
	* app/core/gimpimagemap.c: changed accordingly. Free the shadow tiles
	after using them.

	* app/plug-in/gimpplugin-cleanup.[ch]: add
	gimp_plug_in_cleanup_add_shadow() and _remove_shadow() which keep
	track of whether shadow tiles were created on behalf of a plug-in
	procedure.

	(gimp_plug_in_cleanup): free shadow tiles which were created but
	not destroyed by a plug-in procedure.

	* app/plug-in/gimpplugin-message.c (plug_in_handle_tile_request):
	call gimp_plug_in_cleanup_add_shadow() whenever a plug-in requests
	shadow tiles.

	* tools/pdbgen/pdb/drawable.pdb: use the new drawable shadow
	API. Add new procedure gimp-drawable-free-shadow. Call
	gimp_plug_in_cleaup_remove_shadow() when it gets called.

	* tools/pdbgen/pdb/image.pdb: deprecate gimp-image-free-shadow.
	Calling it has no effect any longer.

	* app/pdb/drawable-cmds.c
	* app/pdb/image-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimpdrawable_pdb.[ch]: regenerated.


svn path=/trunk/; revision=25510
2008-04-21 17:20:51 +00:00
Sven Neumann 4aa7e67c67 removed "add_alpha" parameter from gimp_item_duplicate() and
2008-01-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.[ch]: removed "add_alpha" parameter from
	gimp_item_duplicate() and gimp_item_convert(). This is a relict
	from the time when only the bottom layer was allowed to have no
	alpha channel.

	* app/actions/channels-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/pdb/channel_cmds.c
	* app/pdb/layer_cmds.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/layer.pdb: changed accordingly.

svn path=/trunk/; revision=24570
2008-01-08 11:46:15 +00:00
Michael Natterer ecb2c46dc8 app/actions/layers-commands.c app/core/gimpchannel-combine.c
2007-12-23  Michael Natterer  <mitch@gimp.org>

	* app/actions/layers-commands.c
	* app/core/gimpchannel-combine.c
	* app/core/gimpchannel-select.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-convert.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimpfloatingselundo.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage.c
	* app/core/gimpitem-preview.c
	* app/core/gimpitem.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimplayerundo.c
	* app/core/gimpmaskundo.c
	* app/core/gimppalette-import.c
	* app/core/gimpprojection-construct.c
	* app/core/gimpselection.c
	* app/dialogs/offset-dialog.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c: use accessors for item,
	layer, channel and mask attributes.


svn path=/trunk/; revision=24429
2007-12-23 16:58:41 +00:00
Sven Neumann 43dfbd1c97 made get_tiles() a method of GimpDrawable.
2007-12-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: made get_tiles() a method of
	GimpDrawable.

svn path=/trunk/; revision=24388
2007-12-18 11:20:23 +00:00
Michael Natterer dd80b4c263 added new API gimp_drawable_estimate_memsize() and virtual function
2007-12-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: added new API
	gimp_drawable_estimate_memsize() and virtual function
	GimpDrawable::estimate_memsize() which estimate the memsize of a
	drawable after scaling/resizing.

	* app/core/gimplayer.c: implement the virtual function and take
	the layer mask into account.

	* app/core/gimpimage-item-list.[ch] (gimp_image_item_list_get_list):
	added const qualifiers.

	* app/core/gimpimage-scale.c (gimp_image_scale_check): use the new
	function to correctly estimate the new size instead of scaling the
	drawables' memsizes including all constant parts. Fixes bug #329468.

	* app/gimp-log.[ch]: added IMAGE_SCALE log domain.

	* app/core/gimpimage-scale.c: use it here for debugging output.


svn path=/trunk/; revision=24260
2007-12-04 11:30:31 +00:00
Michael Natterer 036085fd9e app/base/temp-buf.c app/base/tile-manager.c accept NULL in all
2007-11-16  Michael Natterer  <mitch@gimp.org>

	* app/base/temp-buf.c
	* app/base/tile-manager.c
	* app/core/gimpobject.c: accept NULL in all get_memsize() functions.

	* app/core/gimp-utils.[ch]: ditto. Added gimp_string_get_memsize().

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimpdrawableundo.c
	* app/core/gimpimage.c
	* app/core/gimpitempropundo.c
	* app/core/gimplayer.c
	* app/core/gimpmaskundo.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimppreviewcache.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugindef.c
	* app/plug-in/gimppluginmanager.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/text/gimptextundo.c
	* app/vectors/gimpvectorsmodundo.c: simplify
	GimpObject::get_memsize() implementations accordingly.

	* app/core/gimpimageundo.c: ditto. Always keep around colormaps in
	chunks of GIMP_IMAGE_COLORMAP_SIZE to be coonsistent with the
	other colormap handling code.


svn path=/trunk/; revision=24174
2007-11-16 18:19:30 +00:00
Sven Neumann 1954ee81fe use the offsets module TILE_WIDTH and TILE_HEIGHT instead of doing the
2007-09-12  Sven Neumann  <sven@gimp.org>

	* app/base/tile.c (tile_data_pointer): use the offsets module
	TILE_WIDTH and TILE_HEIGHT instead of doing the module operation
	in each and every caller.

	* app/base/boundary.c
	* app/base/pixel-region.c
	* app/base/tile-manager.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimplayer.c
	* app/display/gimpdisplayshell-render.c
	* app/paint-funcs/paint-funcs.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpiscissorstool.c: changed accordingly.


svn path=/trunk/; revision=23515
2007-09-12 18:29:11 +00:00
Sven Neumann 77b7161a32 app/core/gimp-transform-region.[ch] app/core/gimpchannel.c
2007-09-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpimage-item-list.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.c
	* app/paint/gimpperspectiveclone.c
	* app/vectors/gimpvectors.c: removed supersample parameter from
	transform functions and perform it depending on the interpolation
	type (bug #473265).

	* app/tools/gimptransformoptions.[ch]
	* app/tools/gimptransformtool.c: removed Supersample toggle from
	the transform tool options.

	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: document that the
	supersample parameter is unused and improved documentation of the
	recursion-level parameter.

	* app/pdb/transform_tools_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* libgimp/gimpdrawabletransform_pdb.c: regenerated.

svn path=/trunk/; revision=23494
2007-09-10 15:29:48 +00:00
Sven Neumann 49bb407674 app/paint-funcs/Makefile.am
2007-08-08  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/Makefile.am

	* app/paint-funcs/sample-funcs.[ch]: renamed to 
	* app/paint-funcs/subsample-region.[ch]

	* app/paint-funcs/scale-funcs.[ch]: renamed to 
	* app/paint-funcs/scale-region.[ch]

	* app/paint-funcs/reduce-region.[ch]: new files based on a patch
	from Geert Jordaens (bug #464466).

	* app/base/tile-manager-preview.c
	* app/core/gimp-transform-region.c
	* app/core/gimpbrush-scale.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpdrawable.c: changed accordingly.

svn path=/trunk/; revision=23144
2007-08-08 08:35:45 +00:00
Sven Neumann c70b55a403 removed get_color_at() from the GimpPickable interface. Implement the same
2007-05-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimppickable.[ch]: removed get_color_at() from the
	GimpPickable interface. Implement the same functionality using
	get_pixel_at() but with a saner API.

	* app/core/gimpdrawable.c
	* app/core/gimpprojection.c
	* app/core/gimpimagemap.c: removed get_color_at() implementations.

	* app/tools/gimpbycolorselecttool.c: adapt to API change of
	gimp_pickable_get_color_at().

	* app/tools/gimprectangleselecttool.c: added missing include.


svn path=/trunk/; revision=22383
2007-05-02 17:15:03 +00:00
Sven Neumann 7c1fc759f5 added get_pixel_at() method to the GimpPickable interface. This gives
2007-04-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimppickable.[ch]: added get_pixel_at() method to the
	GimpPickable interface. This gives direct access to the pixel
	without converting it to an RGB color.

	* app/core/gimpdrawable.c
	* app/core/gimpimagemap.c
	* app/core/gimpprojection.c: implement the new method and also use
	it to reimplement get_color_at().

	* app/core/gimpimage-crop.c (gimp_image_crop_guess_bgcolor): use
	gimp_pickable_get_pixel_at(). Fixes auto-shrink on indexed and
	grayscale images.

svn path=/trunk/; revision=22359
2007-04-27 16:07:49 +00:00
Mukund Sivaraman f0cff0ff92 app/core/Makefile.am app/core/gimp-transform-resize.c
2006-12-24  Mukund Sivaraman  <muks@mukund.org>

        * app/core/Makefile.am
        * app/core/gimp-transform-resize.c
        * app/core/gimpchannel.c
        * app/core/gimpdrawable-transform.c
        * app/core/gimpdrawable-transform.h
        * app/core/gimpdrawable.c
        * app/core/gimpimage-item-list.c
        * app/core/gimpimage-item-list.h
        * app/core/gimpitem-linked.c
        * app/core/gimpitem-linked.h
        * app/core/gimpitem.c
        * app/core/gimpitem.h
        * app/core/gimplayer.c
        * app/pdb/drawable_transform_cmds.c
        * app/text/gimptextlayer-transform.c
        * app/text/gimptextlayer-transform.h
        * app/tools/gimptransformoptions.c
        * app/tools/gimptransformtool.c
        * app/vectors/gimpvectors.c
        * libgimp/gimpdrawabletransform_pdb.c
        * libgimp/gimpdrawabletransform_pdb.h
        * libgimp/gimpenums.c.tail
        * libgimpbase/gimpbase.def
        * libgimpbase/gimpbaseenums.c
        * libgimpbase/gimpbaseenums.h
        * tools/pdbgen/enums.pl
        * tools/pdbgen/pdb/drawable_transform.pdb: implemented UI and PDB
        for new clipping modes for affine transforms (crop to largest
        rectangle, and crop to largest rectangle with the source's aspect
        ratio); fixed various bugs in the largest rectangle computation
        code; set padding to 6 in the transformation tool options.
2006-12-24 16:48:08 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Simon Budig 5166c11c7d app/core/gimpdrawable.c fix the warnings about the interface
2006-11-24  Simon Budig  <simon@gimp.org>

	* app/core/gimpdrawable.c
	* app/core/gimpprojection.c: fix the warnings about the interface
	initialization.
2006-11-24 22:41:03 +00:00
Michael Natterer dd6f5d711a changed GimpDrawable parameter to "GimpImageType dest_type".
2006-10-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]
	(gimp_image_transform_rgb)
	(gimp_image_transform_color)
	(gimp_image_transform_temp_buf): changed GimpDrawable parameter to
	"GimpImageType dest_type".

	(gimp_image_get_foreground)
	(gimp_image_get_background): ditto and reordered parameters.

	* app/core/gimp-edit.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-merge.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimperaser.c
	* app/paint/gimpheal.c
	* app/paint/gimpink.c
	* app/paint/gimppaintbrush.c: changed accordingly.

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_affine): set the progress to 1.0
	when done, some tiny cleanups around lanczos.
2006-10-25 22:14:36 +00:00
Sven Neumann d34ff5537d libgimpbase/Makefile.am libgimpbase/gimpbase.h added new files that hold
2006-08-29  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimprectangle.[ch]: added new files that hold
	gimp_rectangle_intersect(), factored out of the core.

	* libgimpbase/gimpbase.def: updated.

	* app/core/gimp-edit.c
	* app/core/gimp-utils.c
	* app/core/gimp-utils.h
	* app/core/gimpchannel-combine.c
	* app/core/gimpdrawable-foreground-extract.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-preview.c
	* app/core/gimplayer.c
	* app/core/gimpscanconvert.c
	* app/display/gimpdisplayshell-draw.c: changed includes accordingly.

	* libgimp/gimpdrawablepreview.c: don't duplicate
	gimp_rectangle_intersect() here, use the function in libgimpbase.

	* app/base/siox.c: use gimp_rectangle_intersect() to reduce the
	working area to the region of interest. Fixes bug #340422.
2006-08-29 14:46:32 +00:00
Michael Natterer d25406c924 app/core/gimpchannel.c (gimp_channel_bounds) allow to pass in NULL return
2006-08-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_bounds)
	* app/core/gimpdrawable.c (gimp_drawable_mask_bounds)
	(gimp_drawable_mask_intersect): allow to pass in NULL return
	locations for any of the boundary return values.

	* app/tools/gimpselectiontool.c (gimp_selection_tool_oper_update):
	don't require hovering the selection for moving the selected
	pixels, since this can be distinguished by looking at the
	modifiers now. Check for the presence of any selected pixels
	instead. Fixes bug #349341.
2006-08-03 18:17:42 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Michael Natterer 9d36204976 don't #include "gimp.h".
2006-05-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.c: don't #include "gimp.h".
2006-05-08 11:15:51 +00:00
Sven Neumann cfd7233bc2 renamed gimp_drawable_shadow() to gimp_drawable_get_shadow_tiles().
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_shadow() to
	gimp_drawable_get_shadow_tiles().

	* app/core/gimpimage.[ch]: renamed gimp_image_shadow() to
	gimp_image_get_shadow_tiles() and gimp_image_free_shadow() to
	gimp_image_free_shadow_tiles().

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpimagemap.c
	* app/plug-in/plug-in-message.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

	* app/pdb/color_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-04-07 09:50:23 +00:00
Sven Neumann eababf4891 renamed gimp_drawable_cmap() to gimp_drawable_get_colormap() and let it
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_cmap() to
	gimp_drawable_get_colormap() and let it return a const array.

	* app/core/gimpdrawable-convert.c
	* app/core/gimpimage-convert.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-preview.c: changed accordingly.
2006-04-07 09:30:37 +00:00
Sven Neumann cef9db57fe renamed gimp_drawable_data() to gimp_drawable_get_tiles().
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_data() to
	gimp_drawable_get_tiles().

	[lots of files]: changed accordingly.
2006-04-07 09:21:18 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00
Michael Natterer b55ce9ea2d added new methods ::get_bytes() and ::flush()
2006-03-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppickable.[ch]: added new methods ::get_bytes() and
	::flush()

	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimpimagemap.c
	* app/core/gimpprojection.c: implement ::get_bytes()

	* app/core/gimpprojection.c: implement ::flush() (immediately
	process both the idle renderer's queue and the unflushed update
	areas, to make sure that any reading from the projection will
	re-construct it).

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimpimage-crop.c
	* app/core/gimppalette-import.c
	* app/paint/gimpclone.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpiscissorstool.c
	* tools/pdbgen/pdb/image.pdb: use the pickable interface more
	consistently when reading from any drawable or the projection, and
	call gimp_pickable_flush() before doing so. Fixes bug #332933.

	* app/core/gimpimage-pick-color.c: added comment why the we don't
	call gimp_pickable_flush() here.

	* app/pdb/image_cmds.c
	* libgimp/gimpimage_pdb.c: regenerated.
2006-03-02 19:30:59 +00:00
Michael Natterer 54c86f97f7 app/core/gimpchannel.c app/core/gimpdrawable.c app/core/gimplayer.c
2005-12-23  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpvectors.c: moved variables to local scopes in
	implementations of GimpItem::duplicate()
2005-12-23 01:15:19 +00:00
Michael Natterer 0d4a10fee4 app/config/*.c app/core/*.c app/display/*.c app/text/*.c port to
2005-12-10  Michael Natterer  <mitch@gimp.org>

	* app/config/*.c
	* app/core/*.c
	* app/display/*.c
	* app/text/*.c
	* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
	core reordering and cleanup.
2005-12-10 19:24:36 +00:00
Sven Neumann 93eab43eef Use the canonical form for signal names.
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names.
2005-05-27 16:51:39 +00:00
Michael Natterer 7abaab62e0 added virtual function GimpViewable::get_size() and public API
2005-05-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added virtual function
	GimpViewable::get_size() and public API gimp_viewable_get_size()
	which return width and height and a boolean indicating if the
	viewable has a size at all.
	Added default implementation of GimpViewable::get_popup_size()
	using the new get_size() API.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage.c
	* app/core/gimppattern.c: implement GimpViewable::get_size().

	* app/core/gimpbrush.c
	* app/core/gimppattern.c: removed GimpViewable::get_popup_size()
	implementations, the default one is good enough.

	* app/core/gimpbrushpipe.c (gimp_brush_pipe_get_popup_size):
	redirect to gimp_viewable_get_size() instead of duplicating its
	return values.

	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpview.c: allow pixbuf dragging out of any
	viewable that has a size.

	* app/widgets/gimpdrawabletreeview.c: removed pixbuf dragging code
	here.

	* app/widgets/gimpdnd.c: set gimp busy around encoding/decoding
	pixbufs into/from GtkSelectionData, because it can be a time
	consuming operation.
2005-05-25 10:05:17 +00:00
Michael Natterer e5c0d8eb0e app/core/gimpitem.c app/core/gimpdrawable.c made GimpItem::scale() and
2005-01-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c
	* app/core/gimpdrawable.c
	* app/vectors/gimpvectors.c: made GimpItem::scale() and ::resize()
	work on unattached items.

	* app/widgets/gimplayertreeview.c
	(gimp_layer_tree_view_drop_component): fix drop index.

	* app/widgets/gimpchanneltreeview.c: implement dropping of
	components as new channels. Fixes bug #158483.
2005-01-15 19:17:11 +00:00
Sven Neumann f3166ba9f9 app/base/base-enums.[ch] app/core/gimpdrawable-transform.c
2005-01-11  Sven Neumann  <neumann@jpk.com>

	* app/base/base-enums.[ch]
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/paint-funcs/Makefile.am
	* app/paint-funcs/paint-funcs.[ch]
	* app/paint-funcs/scale-funcs.[ch]: applied patch by Geert Jordaens
	(after a good deal of reformatting for coding style compliance).
	This factors the scale routines into their own file and adds a
	sinc-based (Lanczos) interpolation routine (bug #162250).
2005-01-11 18:31:07 +00:00
Sven Neumann 3e56a07190 don't add documents w/o a name to the list. Fixes bug #159510.
2004-11-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdocumentlist.c (gimp_document_list_deserialize):
	don't add documents w/o a name to the list. Fixes bug #159510.

	* app/core/gimpdrawable.c (gimp_drawable_resize): extended the
	check to take the offsets into account as well.
2004-11-26 14:45:10 +00:00
Sven Neumann f653295e5d do nothing if the size doesn't change. This keeps text layers from being
2004-11-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_resize): do nothing if
	the size doesn't change. This keeps text layers from being
	modified when an image is cropped and the layer is entirely inside
	the cropped area.

	* menus/image-menu.xml.in: put the Quit item back for now. We
	should think about this again in the next development cycle.
2004-11-23 09:32:54 +00:00
Michael Natterer 0d5df41904 app/core/gimpchannel-select.c app/core/gimpchannel.c
2004-11-16  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel-select.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpitem-linked.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/paint/gimppaintcore-stroke.c
	* app/text/gimptextlayer.c: in all functions which somehow
	(explicitely or implicitely) touch undo, either g_return_if_fail()
	on gimp_item_is_attached() or simply don't push an undo step if
	feasible (e.g. for simple stuff like layer opacity).

	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb: let PDB wrappers fail
	accordingly so they don't run into the assertions added above.

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/paint_tools_cmds.c: regenerated.
2004-11-16 13:41:55 +00:00
jaycox 5b5823ba4b Skip resources with unknown signatures instead of quiting. Fixes bug
* plug-ins/common/psd.c: Skip resources with unknown signatures
	instead of quiting.  Fixes bug #142468, and bug #152728

	* app/core/gimpdrawable.c: in functions gimp_drawable_mask_bounds,
	and gimp_drawable_mask_intersect: reinitialize the return values
	after calling gimp_channel_bounds because gimp_channel_bounds
	overwrites the values even when it returns false.  This fixes the
	bug where the gimp crashes when running color tools on layers
	smaller than the image, and processes only part of the image when
	the layer is larger than the image size.
2004-11-10 08:23:05 +00:00
Sven Neumann 66de1a73dc initialize the return values before checking if the drawable is attached.
2004-11-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_mask_bounds)
	(gimp_drawable_mask_intersect): initialize the return values before
	checking if the drawable is attached. Keeps GIMP from going mad if
	this assertion is ever triggered.
2004-11-07 23:17:39 +00:00
Michael Natterer cb48cef8be added gimp_drawable_mask_intersect() which returns the same bounding box
2004-10-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: added gimp_drawable_mask_intersect()
	which returns the same bounding box as gimp_drawable_mask_bounds(),
	but returns TRUE only if there is a non-empty intersection between
	the drawable and the selection, or no selection at all. It also
	returns the intersection as x,y,width,height instead of the
	eeky x1,y1,x2,y2.

	* app/core/gimp-edit.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimagemap.c
	* app/core/gimpselection.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: either switch from
	gimp_drawable_mask_bounds() to _intersect() or check the return
	values of _mask_bounds() manually to avoid operations on empty
	areas. Return successfully because it's a nop, not a failure.
	Fixes bug #155733 for the core.

	* app/pdb/color_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2004-10-19 22:52:04 +00:00