Commit Graph

155 Commits

Author SHA1 Message Date
Alexia Death 355f1bfd56 app: Fix tabs to spaces for dynamics 2009-12-19 17:36:27 +02:00
Alexia Death b95dda6eea app: Fix dynamics mixing for inputs&outputs that have paint options toggles 2009-12-18 20:51:23 +02:00
Michael Natterer 0c81d491fb Change coords in GimpDynamicsOutput from call-by-value to "const GimpCoords*" 2009-10-27 14:30:20 +01:00
Michael Natterer 8394a3db68 Handle dynamic opacity in GimpSourceCore for all its subclasses 2009-10-13 21:02:10 +02:00
Michael Natterer bdd8d8e3fb Use more x,y,width,height instead of x1,y1,x2,y2
(gimp_paint_core_get_orig_image)
(gimp_paint_core_get_orig_proj): changed parameters to x,y,width,height.
Update callers accordingly and use x,y,width,height there too except
in gimpperspectiveclone.c which does better with a bounding box.
2009-06-17 20:46:28 +02:00
Michael Natterer cee39b090f Add more GimpCoords* parameters to reduce usage of global paint_core states
Add GimpCoords* to GimpPaintCore::get_paint_area(),
gimp_brush_core_paste_canvas(), gimp_brush_core_replace_canvas(),
gimp_brush_core_get_brush_mask(), gimp_brush_core_color_area_with_pixmap()
and change callers accordingly.
2009-05-17 22:45:06 +02:00
Michael Natterer 07ba32d6f8 Stop accessing GimpPaintCore's coords members directly (no encapsulation yet).
* app/paint/gimppaintcore.[ch]: add
  gimp_paint_core_{get|set}_{current|last}_coords(), add "const GimpCoords*"
  parameter to ::paint() which gets core->cur_coords passed.

* app/paint/gimpsourcecore.[ch]: add "const GimpCoords*" to ::motion().

* app/paint/gimpbrushcore.c: use the new coords getters/setters instead
  of accessing GimpPaintCore members directly.

* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimpink.c
* app/paint/gimppaintbrush.[ch]
* app/paint/gimpperspectiveclone.c
* app/paint/gimpsmudge.c: change implementations of GimpPaintCore::paint()
  and GimpSourceCore::motion() accordingly. app/paint/ is now virtually
  free of direct access to the paint core's coords members. More to come...
2009-05-03 12:08:21 +02:00
Michael Natterer 50199a542c Made GimpCoords* parameter of GimpPaintCore::start() const.
* app/paint/gimppaintcore.[ch]: made GimpCoords* parameter of
GimpPaintCore::start() const.

* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimpheal.c
* app/paint/gimpperspectiveclone.c
* app/paint/gimpsourcecore.c: changed accordingly.
2009-04-17 22:29:25 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Sven Neumann b37c8bcf0a app/core/Makefile.am added GIMP_ERROR as general error domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimperror.[ch]: added GIMP_ERROR as general error 
domain.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/core/gimptooloptions.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/vectors/gimpvectors-import.c: use GIMP_ERROR as error 
domain
	instead of 0, which is not accepted by g_set_error_literal().

	* app/gui/session.c
	* app/menus/menus.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdevices.c: use G_FILE_ERROR as error domain 
for
	file errors.


svn path=/trunk/; revision=27628
2008-11-12 10:56:06 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +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
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
Sven Neumann 3b067cba23 added gimp_image_get_projection().
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_projection().

	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scroll.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c
	* app/widgets/gimpsamplepointeditor.c
	* tools/pdbgen/pdb/image.pdb: use the new accessor function.

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


svn path=/trunk/; revision=26413
2008-08-07 09:17:46 +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
Michael Natterer 1b1299aff3 added GError** parameter to GimpPaintCore::start().
2006-09-26  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: added GError** parameter to
	GimpPaintCore::start().

	* app/tools/gimppainttool.c (button_press): display the error in
	the statusbar.

	* app/paint/gimppaintcore-stroke.c: pass a NULL error, effectively
	swallowing mssages. Will fix that later.

	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpsourcecore.c: changed accordingly. Set the error
	instead of calling g_message().

	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c: implement start() and bail out
	early on indexed drawables instead of showing a g_message() in
	other functions that are called later.

	* app/tools/gimptool.[ch]: added GError** to GimpTool::initialize().

	* app/tools/gimptool.c (gimp_tool_initialize): display the error
	in the statusbar. Keep the external API GError-free.

	* app/tools/gimprectangletool.[ch]: added GError** to
	gimp_rectangle_tool_initialize().

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c: changed accordingly. Set the
	errors in initialize() instead of using gimp_message().

	* app/tools/gimpblendtool.c: implement initialize() and bail out
	early on indexed images instead of showing a gimp_message() in
	button_press().
2006-09-26 20:55:40 +00:00
Michael Natterer 7b0531aa91 implement GimpPaintCore::start() and set paint_core->use_saved_proj to
2006-09-20  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpsourcecore.c: implement GimpPaintCore::start()
	and set paint_core->use_saved_proj to TRUE when we are using
	the destination drawable image's projection as source. Return
	FALSE from start() if there is no src_drawable set and removed
	checks for src_drawable != NULL further down in the code path.

	* app/tools/gimpperspectiveclonetool.c (button_press)
	* app/tools/gimpsourcetool.c (button_press): don't fiddle with
	paint_core->use_saved_proj here.

	* app/paint/gimpclone.c: implement GimpPaintCore::start() and
	return FALSE if we are in pattern mode and there is no pattern to
	clone from. Removed GimpPaintCore::paint() implementation because
	all it did was popping a message if there is no pattern. Removed
	check for pattern != NULL and cleaned up the file a bit.

	* app/paint/gimpperspectiveclone.c (paint): removed message about
	no pattern to clone from.
2006-09-19 23:14:50 +00:00
Michael Natterer ff45766f9b made gimp_source_core_motion() a public function for the time being,
2006-09-12  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpsourcecore.[ch]: made gimp_source_core_motion() a
	public function for the time being, pending further refactoring.

	* app/paint/gimpperspectiveclone.[ch]: derive from GimpClone and
	remove everything that is already imeplemented in the parent
	classes. Particullarly, removed motion() implementation in favor
	of a get_source() implementation and simply use GimpClone's
	motion(). Also refuse to work on indexed drawables.

	* app/paint/gimpperspectivecloneoptions.[ch]: derive from
	GimpCloneOptions and remove everything that is already done by the
	parent classes.

	* app/tools/gimpperspectiveclonetool.c: changed
	accordingly. Doesn't derive from GimpSourceTool yet since there is
	some virtual function refactoring in GimpSourceTool missing.
2006-09-12 12:57:55 +00:00
Michael Natterer 93a9ad8c13 must not clamp the paint area against the boundary of the src_tiles.
2006-09-08  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpperspectiveclone.c (gimp_perspective_clone_motion):
	must not clamp the paint area against the boundary of the
	src_tiles. Various small cleanups.

	* app/paint/gimpsourcecore.[ch] (GimpSourceCore::motion): removed
	src_image parameter.

	Added new virtual function GimpSourceCore::get_source() and moved
	the source PR initialization code to its default implementation.
	(GimpPerspectiveClone will override this method later).

	* app/paint/gimpclone.c (gimp_clone_motion)
	* app/paint/gimpheal.c (gimp_heal_motion): changed accordingly.
2006-09-08 15:15:59 +00:00
Michael Natterer fb13701060 pass the src_offset_x and src_offset_y as separate parameters to
2006-09-07  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpsourcecore.[ch] (gimp_source_core_motion): pass
	the src_offset_x and src_offset_y as separate parameters to
	GimpSourceCore::motion().

	* app/paint/gimpheal.c (gimp_heal_motion): changed accordingly.

	* app/paint/gimpclone.c (gimp_clone_motion): ditto and use the new
	values for pattern cloning instead of asuming stuff that relies on
	knowledge of gimp_source_core_motion()'s internals.
2006-09-07 09:35:52 +00:00
Michael Natterer f83925673f pass the width and height of the sub-area of paint_area to
2006-09-07  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpsourcecore.[ch] (gimp_source_core_motion): pass
	the width and height of the sub-area of paint_area to
	GimpSourceCore::motion().

	* app/paint/gimpclone.c (gimp_clone_motion)
	* app/paint/gimpheal.c (gimp_heal_motion): use the new parameters
	instead of taking these values from srcPR->w and ->h, which was
	very confusing.
2006-09-07 08:49:52 +00:00
Michael Natterer 9ecec01da2 do a lot of stuff that was duplicated in clone and heal. Added lots of
2006-09-05  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpsourcecore.[ch] (gimp_source_core_motion): do a
	lot of stuff that was duplicated in clone and heal. Added lots of
	parameters to GimpSourceCore::motion() to get the stuff down to
	clone and heal.

	* app/paint/gimpclone.c (gimp_clone_motion): changed accordingly.

	* app/paint/gimpheal.c (gimp_heal_motion): ditto. Made it work for
	dest_drawable != src_pickable. Always add alpha to all buffers and
	convert the source buffer to the dest drawable's color space
	because the algorithm works only on buffers of same depth.
2006-09-04 22:54:50 +00:00
Michael Natterer 47b50d9123 renamed enum GimpCloneAlignMode to GimpSourceAlignMode.
2006-09-03  Michael Natterer  <mitch@gimp.org>

	* app/paint/paint-enums.[ch]: renamed enum GimpCloneAlignMode to
	GimpSourceAlignMode.

	* app/paint/Makefile.am
	* app/paint/gimpsourcecore.[ch]
	* app/paint/gimpsourceoptions.[ch]: new classes which contain the
	source selection functionality factored out of the clone core and
	options.

	* app/paint/gimpclone.[ch]
	* app/paint/gimpcloneoptions.[ch]: remove that functionality here
	and derive from the new classes.

	* app/tools/gimpclonetool.c: changed accordingly.
2006-09-02 22:39:26 +00:00
Michael Natterer a3217d46fe app/paint/gimpclone.c minor cosmetic cleanup merged from the
2006-09-02  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpclone.c
	* app/paint/gimpink.c: minor cosmetic cleanup merged from the
	soc-2006-healing-brush branch.
2006-09-02 16:58:43 +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
Sven Neumann 0b12c776e0 use doubles for src coordinates. Added properties for "src-drawable",
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpclone.[ch]: use doubles for src coordinates. Added
	properties for "src-drawable", "src-x" and "src-y".

	* tools/pdbgen/pdb/paint_tools.pdb: resurrected cloning from
	drawables over the PDB. This used to be broken for quite a while.

	* app/pdb/paint_tools_cmds.c: regenerated.
2006-03-30 14:04:53 +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 ef9b04c535 Fixed incomplete core/ui separation of paint tools and paint methods:
2005-12-27  Michael Natterer  <mitch@gimp.org>

	Fixed incomplete core/ui separation of paint tools and paint
	methods:

	* app/core/core-enums.h
	* app/core/gimpcontext.[ch]: added a "paint-info" property and API
	so the current paint method can be selected without the need for
	an active tool.

	(gimp_context_real_set_tool): set the paint-info to
	tool_info->paint_info so the paint method follows the active tool
	just as the active image follows the active display.

	* app/core/gimp.h (struct Gimp)
	* app/core/gimppaintinfo.[ch]: added "standard_paint_info" API
	and stuff to be consistent with other context object properties.

	* app/paint/gimp-paint.c: set the paintbrush as
	standard_paint_info.

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): removed the
	hack of falling back to the paintbrush when there is no active
	tool and use the active paint method instead. Fall back to the
	standard paint method if there is no active one.
	(nothing in the core uses the active tool any more now).

	* app/widgets/gimpdeviceinfo.h: add the paint info to the
	properties which are saved in devicerc.

	Added identifiers (names) and stock-ids to GimpPaintInfo:

	* app/core/gimppaintinfo.[ch] (gimp_paint_info_new): added
	identifier and stock-id parameters.

	* app/core/gimptoolinfo.c (gimp_tool_info_new): removed the hack
	of setting the paint-info stock-id from the tool-info stock-id.

	* app/paint/paint-types.h
	* app/paint/gimp-paint.c: changed GimpPaintRegisterCallback
	accordingly.

	* app/tools/gimp-tools.c (gimp_tools_register): changed paint
	info names accordingly.

	* app/paint/*.c (gimp_*_register): pass identifier and stock-id
	accordingly.
2005-12-27 18:57:01 +00:00
Michael Natterer c86deaa853 In fixed mode, paint incremental so the individual brushes are properly
2005-12-07  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpclone.c (gimp_clone_motion): In fixed mode, paint
	incremental so the individual brushes are properly applied on top
	of each other. Fixes bug #322791.
2005-12-07 21:17:12 +00:00
Michael Natterer 684fe95ce3 use G_DEFINE_TYPE().
2005-12-07  Michael Natterer  <mitch@gimp.org>

	* app/paint/*: use G_DEFINE_TYPE().
2005-12-07 21:11:53 +00:00
Michael Schumacher 432f10821c app/paint/gimpclone.c app/paint/paint-enums.c added alignment mode for
2005-12-07  Michael Schumacher  <schumaml@cvs.gnome.org>

	* app/paint/gimpclone.c
	* app/paint/paint-enums.c
	* app/paint/paint-enums.h: added alignment mode for cloning from a
	fixed location source as suggested in bug #322791.
2005-12-07 20:25:00 +00:00
Michael Natterer 6cdf44d62f set core->jitter here for all brush-based paint tools.
2005-10-04  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpbrushcore.c (gimp_brush_core_start): set
	core->jitter here for all brush-based paint tools.

	(gimp_brush_core_interpolate): cleanup.

	* app/paint/gimpbrushcore.h: removed trailing whitespace.

	* app/paint/gimpclone.c (gimp_clone_motion)
	* app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): removed
	jitter stuff here.
2005-10-04 20:16:52 +00:00
William Skaggs d452942483 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* gimp/app/paint/gimpbrushcore.c
	* gimp/app/paint/gimpbrushcore.h
	* gimp/app/paint/gimpclone.c
	* gimp/app/paint/gimppaintbrush.c
	* gimp/app/paint/gimppaintoptions.c
	* gimp/app/paint/gimppaintoptions.h
	* gimp/app/tools/gimppaintoptions-gui.c: Apply patch from
	Adrian Likins to add "jitter" to paint tools (bug #163049),
	with small fixes for coding style and default jitter set
	to 0.2 instead of 0.0.
2005-10-03 19:03:14 +00:00
Michael Natterer 09454fb2a4 some general cleanup.
2005-09-03  Michael Natterer  <mitch@gimp.org>

	* app/base/pixel-region.[ch]: some general cleanup.

	(pixel_region_init_temp_buf)
	(pixel_region_init_data): new functions which initialize pixel
	regions on TempBufs and on raw contiguous arrays of pixel data.

	(pixel_region_configure): fixed a bug that has probably been there
	forever: when processing contiguous (non-tiled) data, interpret
	the original x and y coordinates of the region as offsets into
	the data. Before this fix, the initial x and y were simply ignored
	(by using them in a broken way), thus always forcing the upper
	left corner of the region being the beginning of the passed data.

	Lots of code was working around this problem by setting the
	pixel_region's data pointer to the proper starting pixel of the
	region in the middle the buffer.

	* libgimp/gimppixelrgn.c: some general cleanup.

	(gimp_pixel_rgn_configure): same fix as above. Fortunately, nobody
	seems to know that libgimp pixel regions can be used on arrays of
	data, just as core ones. Only two plug-ins were using this
	feature, and they are antique and written by spencer and federico,
	respectively. They both don't use offsets into the buffers and are
	not affected by this change. It's highly unlikely that anybody out
	there knows/uses this feature, so it can IMHO be safely changed.

	* app/base/temp-buf.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-combine.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpimage-preview.c
	* app/core/gimplayer.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c: use the pixel_region_init_foo()
	functions instead of initializing regions of TempBufs and raw data
	manually. Removed lots of workarounds for the broken offset
	handling. The changed places of code are much more readable now.
2005-09-03 17:16:58 +00:00
Michael Natterer c32827a786 The previous commit added tons of code just to completely break clone
2005-08-29  Michael Natterer  <mitch@gimp.org>

	The previous commit added tons of code just to completely break
	clone align behavior. Reverted lots of the changes and do the
	sample-merged stuff at the innermost place (gimp_clone_motion).
	This change also enables changing sample-merged between paint
	strokes.

	* app/paint/gimpclone.[ch] (struct GimpClone): changed member
	"src_pickable" back to "src_drawable".

	(gimp_clone_paint): completely reverted.

	(gimp_clone_motion): do the drawable/projection -> pickable
	stuff and drawable offset handling here.

	Fixed signal handling to connect to the drawable's "removed"
	signal (not "disconnect", eek). Disconnect from the signal once
	the drawable has been removed.

	* app/tools/gimpclonetool.c: changed accordingly.
2005-08-29 20:48:26 +00:00
Michael Natterer 26374e814e Immplement "Sample Merged" for the clone tool. Fixes bug #123627.
2005-08-28  Michael Natterer  <mitch@gimp.org>

	Immplement "Sample Merged" for the clone tool. Fixes bug #123627.

	* app/paint/gimppaintcore.[ch] (struct GimpPaintCore): added
	members "saved_proj_tiles" which stores the unmodified projection,
	"orig_proj_buf" which stores the unmodified temp paint application
	buf and "use_saved_proj" which controls if all the additional
	stuff should be allocated and managed.

	(gimp_paint_core_start): allocate the saved_proj_tiles if needed.

	(gimp_paint_core_get_orig_proj): new function like
	gimp_paint_core_get_orig_image() which returns unmodified
	projection pixels for paint application.

	(gimp_paint_core_validate_saved_proj_tiles): new function like
	gimp_paint_core_validate_undo_tiles() which copies the tiles that
	will be dirtied to saved_proj_tiles.

	(gimp_paint_core_paste): call above save_proj_tiles() so
	projection tiles are saved before dirtying them.

	* app/paint/gimpclone.[ch]: replaced member src_drawable by
	src_pickable and use the image's projection if sample_merged it
	TRUE. Adjust src offsets accordingly and use GimpPaintCore's new
	get_orig_proj() API to get the src pixels.

	* app/paint/gimpcloneoptions.[ch]: added boolean "sample_merged"
	property.

	* app/tools/gimpclonetool.c: follow GimpClone's src_drawable ->
	src_pickable change.

	(gimp_clone_tool_button_press): set the paint_core's
	"use_saved_proj" boolean before chaining up.

	(gimp_clone_options_gui): add a "Sample Merged" toggle button.
2005-08-28 19:17:44 +00:00
Michael Natterer 932b45679d converted tabs to spaces.
2004-07-28  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpclone.c: converted tabs to spaces.
2004-07-28 11:17:49 +00:00
Michael Natterer 85c2b2dd4f removed enum GimpPaintCoreState.
2004-07-19  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.h: removed enum GimpPaintCoreState.

	* app/paint/paint-enums.h: added enum GimpPaintState (with values
	that have a name space).

	* app/paint/gimppaintcore.[ch]
	* app/paint/gimpairbrush.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimpink.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimpsmudge.c
	* app/tools/gimppainttool.c: changed accordingly.

	* app/tools/gimpinktool.c: removed unused #include.
2004-07-19 14:37:40 +00:00
Michael Natterer 587e070ff4 removed PRETRACE_PAINT and POSTTRACE_PAINT from the GimpPaintCoreState
2004-06-14  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: removed PRETRACE_PAINT and
	POSTTRACE_PAINT from the GimpPaintCoreState enum. Removed
	"gboolean traces_on_window" from GimpPaintCoreClass.

	* app/paint/gimpclone.[ch]
	* app/paint/gimpink.c
	* app/tools/gimpclonetool.c: changed accordingly.

	* app/tools/gimppainttool.c: ditto. Show the brush outline
	while painting. Fixes bug #118348.
2004-06-14 15:26:29 +00:00
Michael Natterer 3e2690832c added new virtual function GimpPaintCore::post_paint() and call it after
2004-06-14  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: added new virtual function
	GimpPaintCore::post_paint() and call it after calling
	GimpPaintCore::paint().

	* app/paint/gimpbrushcore.[ch]: renamed brush_core->grr_brush
	to brush_core->main_brush and reset brush_core->brush
	to brush_core->main_brush in GimpPaintCore::post_paint().

	* app/paint/gimpbrushcore.c
	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimppainttool.c: removed all code which restores
	the brush_core's old brush after painting since post_paint()
	does this automatically now.

	* app/paint/gimpclone.[ch]: moved static variables to the
	GimpClone struct.
2004-06-14 12:52:33 +00:00
Michael Natterer 23cfde41ba removed enum GimpPaintCoreFlags and member GimpPaintCore::flags. Added
2004-05-27  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: removed enum GimpPaintCoreFlags
	and member GimpPaintCore::flags. Added "gboolean traces_on_window"
	to GimpPaintCoreClass (defaults to FALSE).

	* app/paint/gimpclone.c: set traces_on_window = TRUE.

	* app/paint/gimpbrushcore.[ch]: added
	"gboolean handles_changing_brush" to GimpBrushCoreClass (defaults
	to FALSE).

	* app/paint/gimpclone.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.c: set handles_changing_brush = TRUE.

	* app/tools/gimppainttool.c: changed accordingly.
2004-05-27 20:48:49 +00:00
Michael Natterer b9d74b9aa4 added "guint32 time" parameters to GimpPaintCore::paint() and
2004-05-26  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: added "guint32 time" parameters
	to GimpPaintCore::paint() and ::interpolate().

	* app/paint/gimpairbrush.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c: changed accordingly.

	* app/paint/gimpink.c: ditto and use the passed time instead of
	hardcoded dummy values.

	* app/paint/gimppaintcore-stroke.c: pass '0' as time.

	* app/tools/gimppainttool.c: pass the GdkEvent time.
2004-05-26 16:13:53 +00:00
Michael Natterer 1bdb42bc53 removed "gdouble scale" parameter and added "GimpPaintOptions" in
2004-05-26  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: removed "gdouble scale" parameter
	and added "GimpPaintOptions" in GimpPaintCore::get_paint_area().
	Check if virtual functions exist befoe calling them.

	* app/paint/gimpbrushcore.[ch]: added "gdouble scale" to GimpBrushCore
	and "gboolean use_scale" to GimpBrushCoreClass (defaults to TRUE).
	Set scale from paint_options in GimpPaintCore::get_paint_area().
	Removed "scale" parameter from gimp_brush_core_paste_canvas()
	and _replace_canvas().

	* app/paint/gimpsmudge.c (gimp_smudge_class_init): set use_scale
	to FALSE.

	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c: removed all scale calculations and
	simply pass paint_options to GimpPaintCore::get_paint_area().
2004-05-26 09:32:03 +00:00
Michael Natterer 9a41a73de8 app/paint/Makefile.am app/paint/gimpbrushcore-kernels.h new GimpPaintCore
2004-05-25  Michael Natterer  <mitch@gimp.org>

	* app/paint/Makefile.am
	* app/paint/gimpbrushcore-kernels.h
	* app/paint/gimpbrushcore.[ch]: new GimpPaintCore subclass
	containing all the brush painting specific stuff.

	* app/paint/gimppaintcore-kernels.h: removed this file.

	* app/paint/gimppaintcore.[ch]: removed all brush stuff.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.[ch]
	* app/paint/gimpconvolve.[ch]
	* app/paint/gimpdodgeburn.[ch]
	* app/paint/gimperaser.[ch]
	* app/paint/gimppaintbrush.[ch]
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.[ch]: changed accordingly. Derive all
	classes which used to derive directly from GimpPaintCore from
	GimpBrushCore now. Lots of cleanup.

	* app/paint/paint-types.h
	* app/paint/gimp-paint.c
	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimppainttool.c
	* tools/kernelgen.c: changed accordingly.
2004-05-25 20:41:09 +00:00
Sven Neumann 1c860eb121 fixed a compiler warning.
2004-05-24  Sven Neumann  <sven@gimp.org>

	* plug-ins/maze/maze_face.c: fixed a compiler warning.

2004-05-24  Sven Neumann  <sven@gimp.org>

	Applied a patch from Philip Lafleur (bug #142808):

	* app/paint/gimppaintcore.h: define PRESSURE_SCALE to 1.5

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c: use the PRESSURE_SCALE constant.
2004-05-24 13:11:43 +00:00
Michael Natterer 9efe077ca2 also return the color's alpha byte if it has alpha, not only the converted
2004-01-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch] (gimp_image_get_color): also return the
	color's alpha byte if it has alpha, not only the converted RGB
	values.  Return OPAQUE_OPACITY for drawables without alpha.
	Fixes bug #131706.

	* app/core/gimpdrawable.c (gimp_drawable_get_color_at)
	* app/core/gimpimage-contiguous-region.c
	(gimp_image_contiguous_region_by_color)
	* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at)
	* app/core/gimpimagemap.c (gimp_image_map_get_color_at)
	* app/paint/gimpclone.c (gimp_clone_line_image): removed separate
	handling of the alpha byte from all users of gimp_image_get_color().
2004-01-18 13:19:59 +00:00
Michael Natterer aaf84a73d2 removed function map_to_color() since it does not belong here and the two
2003-09-05  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: removed function map_to_color()
	since it does not belong here and the two places using it look much
	cleaner when doing that stuff themselves.

	* app/core/gimpdrawable-preview.c: cleanup.
	(gimp_drawable_preview_scale): do the indexed palette lookup here
	instead of calling map_to_color().

	* app/core/gimpimage.c (gimp_image_get_color): transform the
	colors here instead of calling map_to_color().

	* app/core/gimpimage.[ch] (gimp_image_get_color): reordered
	parameters src parameters are before dest parameters.
	Made the src color const.

	(gimp_image_transform_color): reordered so src parameters are
	*after* dest parameters (since this function operates on the dest
	image and it makes sense to have the dest parameters
	together). Made the src color const here, too.

	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimpimage-projection.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer.c
	* app/core/gimppalette-import.c
	* app/paint/gimpclone.c
	* app/paint/gimppaintcore.c: changed accordingly.

	* app/core/gimpedit.c (gimp_edit_cut,copy): simplified by
	moving the "cropped" variable to a local scope.

	* app/core/gimpimage-mask.c: calling gimp_image_update() followed
	by gimp_viewable_imvalidate_preview(drawable) is equal to calling
	gimp_drawable_update() directly.
2003-09-05 17:44:39 +00:00
Dave Neary cfbde0f301 Fixed a mistake in the code which does a pattern clone. Closes bug
2003-07-19  Dave Neary  <bolsh@gimp.org>

	* app/paint/gimpclone.c: Fixed a mistake in the code which does
	a pattern clone. Closes bug #117433.

	* app/widgets/gimpbrushfactoryview.c: Added a tooltip for the
	Spacing slider.
2003-07-19 10:51:18 +00:00
Michael Natterer 8224476afb added utility function gimp_paint_options_get_fade() which calculates an
2003-07-16  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintoptions.[ch]: added utility function
	gimp_paint_options_get_fade() which calculates an opacity
	value from paint_core->pixel_dist.

	* app/paint/gimppaintbrush.c: removed the same code here and use
	gimp_paint_options_get_fade().

	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimpsmudge.c: enabled fade for all paint tools, along
	with a general opacity cleanup:

	Use the opacity from gimp_context_get_opacity() *only* for the
	image_opacity. In particular, *never* use it as initial value for
	calculating the brush_opacity. Instead, start calculating the
	brush_opacity from gimp_paint_options_get_fade() and return early
	if it returns 0.0, if not, multiply tool specific opacity sources
	like the current pressure.

	(This changes the effect of the paint tools for particular opacity
	values, but makes the impact of opacity on the final rendering
	linear and more intuitive)

	* app/tools/gimppaintoptions-gui.c: enabled the "Fade" frame for
	the tools above.

	* app/paint/gimppaintcore.c: purely cosmetic cleanup.
2003-07-16 11:25:37 +00:00