Commit Graph

514 Commits

Author SHA1 Message Date
Michael Natterer 9eb90fe54e changed src_pickable parameter to src_type.
2006-09-09  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpclone.c (gimp_clone_line_image): changed src_pickable
	parameter to src_type.

	(gimp_clone_motion): allow the passed srcPR to have alpha even if
	the source pickable is flat. Pass the correct GimpImageType to
	gimp_clone_line_image().
2006-09-09 18:06:24 +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
Hans Breuer ccb25e3798 updated
2006-09-08  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated

	* app/paint/gimpperspectiveclone.c : error C2057: expected constant
	expression. Stack allocation of dynamic sized arrays is afaik a GCC
	extension, use g_alloca() instead.
2006-09-08 11:45:06 +00:00
Michael Natterer 1b1497657a Merged the "soc-2006-perspective-clone" branch. That branch is now
2006-09-07  Michael Natterer  <mitch@gimp.org>

	Merged the "soc-2006-perspective-clone" branch. That branch is
	now officially closed and all further fixes and changes have to
	be applied to HEAD.

	Did some minor adjustments, mostly small indentation and spacing
	fixes. Derive the tool from GimpBrushTool and renamed the enum
	added to paint-enums.h and it values, added stock icon and menu
	entry.

	Thanks a lot to Pedro Alonso Ferrer!

	* app/paint/paint-enums.[ch]: new enum GimpPerspectiveCloneMode.

	* app/paint/Makefile.am
	* app/paint/gimpperspectiveclone.[ch]
	* app/paint/gimpperspectivecloneoptions.[ch]: the perspective
	clone core and its options.

	* app/paint/gimp-paint.c: register it.

	* app/tools/Makefile.am
	* app/tools/gimpperspectiveclonetool.[ch]: the perspective clone tool.

	* app/tools/gimp-tools.c: register it.

	* app/tools/gimppaintoptions-gui.c: show the widgets that are used
	by perspective clone.

	* app/widgets/gimphelp-ids.h: the help ID.

	* themes/Default/images/Makefile.am
	* themes/Default/images/tools/stock-tool-perspective-clone-16.png
	* themes/Default/images/tools/stock-tool-perspective-clone-22.png
	* libgimpwidgets/gimpstock.[ch]: its stock ID and icons.

	* menus/image-menu.xml.in: added it to the menu.
2006-09-07 17:10:22 +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 869ec3acd7 corrected origPR extents calculation. Makes the tool work at image borders
2006-09-05  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpheal.c (gimp_heal_motion): corrected origPR
	extents calculation. Makes the tool work at image borders
	where it used to warn.

	(gimp_heal_laplace_iteration)
	(gimp_heal_region): minor coding style stuff.
2006-09-04 23:24:31 +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 fca7fc0257 removed enum GimpHealAlignMode, we use the GimpSourceAlignMode now and can
2006-09-04  Michael Natterer  <mitch@gimp.org>

	* app/paint/paint-enums.[ch]: removed enum GimpHealAlignMode, we
	use the GimpSourceAlignMode now and can always disable REGISTERED
	in the GUI should it turn out to be really totally pointless.

	* app/paint/Makefile.am
	* app/paint/gimphealoptions.[ch]: removed. Its properties are
	completely covered by GimpSourceOptions.

	* app/paint/gimpheal.[ch]: derive from GimpSourceCore.

	* app/tools/gimphealtool.[ch]: derive from GimpSourceTool.
2006-09-04 15:40:56 +00:00
Michael Natterer 6a073e6874 added non-property boolean member "use_source" which defalts to TRUE.
2006-09-03  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpsourceoptions.[ch] (struct GimpSourceOptions): added
	non-property boolean member "use_source" which defalts to TRUE.

	* app/paint/gimpcloneoptions.c: imeplement GObject::notify() and
	set source_options->use_source to TRUE if the clone type is
	GIMP_IMAGE_CLONE.

	* app/paint/gimpsourcecore.h: removed bogus
	gimp_source_core_register() prototype.
2006-09-03 14:38:42 +00:00
Sven Neumann a44d24ccf3 added construct-only property "undo-desc". Use this when pushing an undo
2006-09-03  Sven Neumann  <sven@gimp.org>

        * app/paint/gimppaintcore.[ch]: added construct-only property
        "undo-desc". Use this when pushing an undo instead of attempting
        an unsuccessful lookup of the GimpPaintInfo object.

        * tools/pdbgen/pdb/paint_tools.pdb
        * app/tools/gimppainttool.c: use paint_info->blurb as undo
        description when constructing the paint core.

        * app/pdb/paint_tools_cmds.c: regenerated.
2006-09-03 13:16:58 +00:00
Hans Breuer ad6829dde0 include "gimpcontext.h" for gimp_context_set_gradient()
2006-09-03  Hans Breuer  <hans@breuer.org>

	* app/core/gimp-gradients.c : include "gimpcontext.h" for
	gimp_context_set_gradient()

	* **/makefile.msc app/gimpcore.def : updated
2006-09-03 12:39:24 +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 db52679583 Merged the "soc-2006-healing-brush" branch. That branch is now officially
2006-09-02  Michael Natterer  <mitch@gimp.org>

	Merged the "soc-2006-healing-brush" branch. That branch is now
	officially closed and all further fixes and changes have to be
	applied to HEAD.

	Did some minor adjustments, mostly small indentation and spacing
	fixes. Derive the tool from the newly introduced GimpBrushTool
	which did not exist when the branch was created.

	Thanks a lot to Kevin Sookocheff for this nice contribution!

	* app/paint/paint-enums.[ch]: new enum GimpHealAlignMode.

	* app/paint/Makefile.am
	* app/paint/makefile.msc
	* app/paint/gimpheal.[ch]
	* app/paint/gimphealoptions.[ch]: the heal core and its options.

	* app/paint/gimp-paint.c: register the heal core.

	* app/tools/Makefile.am
	* app/tools/makefile.msc
	* app/tools/gimphealtool.[ch]: the heal tool.

	* app/tools/gimp-tools.c: register the heal tool.

	* app/tools/gimppaintoptions-gui.c: show the widgets that are used
	by heal.

	* app/widgets/gimphelp-ids.h: the heal help ID.

	* tools/pdbgen/stddefs.pdb
	* tools/pdbgen/pdb/paint_tools.pdb: the heal PDB wrappers.

	* app/widgets/widgets-enums.h
	* app/widgets/gimpcursor.c
	* cursors/Makefile.am
	* cursors/makefile.msc
	* cursors/tool-heal.png
	* cursors/xbm/tool-heal.xbm
	* cursors/xbm/tool-heal-mask.xbm: a new cursor for the heal tool.

	* libgimpwidgets/gimpstock.[ch]
	* themes/Default/images/Makefile.am
	* themes/Default/images/makefile.msc
	* themes/Default/images/tools/stock-tool-heal-16.png
	* themes/Default/images/tools/stock-tool-heal-22.png: new stock
	icons for the heal tool.

	* app/pdb/internal_procs.c
	* app/pdb/paint_tools_cmds.c
	* libgimp/gimppainttools_pdb.[ch]: regenerated.
2006-09-02 18:54:35 +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
Michael Natterer b53aa45a76 Changed GimpViewable preview rendering to have a context to get
2006-08-29  Michael Natterer  <mitch@gimp.org>

	Changed GimpViewable preview rendering to have a context to get
	FG/BG/whatever from. Use the context to enable dynamic FG/BG
	colors in gradients. Fixes bug #127676 and bug #352214. Addresses
	bug #128367 (doesn't fix it because there's no loading/saving and
	no GUI yet).

	* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
	specifying gradient colors in terms of foreground and background.

	* app/core/gimpgradient.[ch]: added color_type members to the
	GimpGradientSegment struct and honor them in
	gimp_gradient_get_color_at(). Added GimpContext parameters to all
	functions which finally call get_color_at().

	* app/core/gimp-gradients.c: use the new method to implement the
	builtin gradients.

	* app/core/gimpviewable.[ch]: added GimpContext parameters to all
	get_preview() and get_pixbuf() functions.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpgradient.c
	* app/core/gimpimage-preview.[ch]
	* app/core/gimpimagefile.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/text/gimpfont.c
	* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
	and ::get_pixbuf() implementations accordingly.

	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.[ch]
	* app/dialogs/dialogs-constructors.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimptexttool.c
	* app/actions/gradient-editor-commands.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpbrusheditor.[ch]
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpclipboard.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainercombobox.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerentry.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimppropwidgets.[ch]
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpthumbbox.[ch]
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpundoeditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpview-popup.[ch]
	* app/widgets/gimpview.[ch]
	* app/widgets/gimpviewablebutton.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpviewrenderer.[ch]
	* app/widgets/gimpviewrenderer-frame.c
	* app/widgets/gimpviewrendererbrush.c
	* app/widgets/gimpviewrendererbuffer.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimage.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
	and parameters, implement GimpDocked::set_context() in many
	widgets. Pass these locally remembered contexts to GimpViewable
	functions. Did some minor cleanups on the way. There are still
	some minor FIXMEs around where the code uses a NULL context (which
	is allowed by the APIs)

	* app/pdb/drawable_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-08-29 21:44:51 +00:00
Michael Natterer 9a85ba5b3a minor cleanup.
2006-08-30  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpbrushcore.c: minor cleanup.
2006-08-29 20:19:28 +00:00
Kevin Sookocheff 02156f9a74 Partially implemented sample-merged healing. 2006-08-15 21:15:59 +00:00
William Skaggs 33d41964a9 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/paint/gimpbrushcore.c (gimp_brush_core_color_area_with_pixmap):
	kludge to adjust offset for even-dimensioned brushes;
	fixes bug #166622.
2006-08-15 17:21:18 +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 60e3301802 M ChangeLog M app/paint/gimpconvolve.c M app/paint-funcs/paint-funcs.c M
M ChangeLog
M app/paint/gimpconvolve.c
M app/paint-funcs/paint-funcs.c
M app/paint-funcs/paint-funcs.h
M app/tools/gimpiscissorstool.c
M libgimpbase/gimputils.c
M modules/colorsel_cmyk.c
M regexrepl/regex.c
2006-04-20 07:15:15 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann 5fc9bd4096 app/actions/tool-options-commands.c app/core/gimp.c
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/actions/tool-options-commands.c
	* app/core/gimp.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpcontext.c
	* app/core/gimpdatafactory.c
	* app/core/gimpgradient-load.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimplist.c
	* app/core/gimppalette.c
	* app/dialogs/template-options-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/paint/gimp-paint.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptoolbox-dnd.c: use gimp_object_set_static_name()
	and gimp_object_take_name() where appropriate.
2006-04-07 10:51:22 +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 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 63742ead9f register GimpBrushApplicationMode.
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/paint/paint-enums.h: register GimpBrushApplicationMode.

	* app/paint/paint-enums.c
	* tools/pdbgen/enums.pl: regenerated.
2006-03-27 15:14:36 +00:00
Michael Natterer cc4badb87b define GIMP_COORDS_DEFAULT_VALUES, a struct initializer for GimpCoords.
2006-03-19  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: define GIMP_COORDS_DEFAULT_VALUES, a
	struct initializer for GimpCoords.

	* app/core/gimpimage-snap.c
	* app/paint/gimppaintcore-stroke.c
	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpvectors-compat.c
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: use it here.

	* app/pdb/paint_tools_cmds.c
	* app/pdb/vectors_cmds.c: regenerated.
2006-03-19 13:39:10 +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 e1ceed5147 define GIMP_PARAM_STATIC_STRINGS which is G_PARAM_STATIC_NAME|NICK|BLURB.
2006-01-18  Michael Natterer  <mitch@gimp.org>

	* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
	which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
	GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
	GIMP_PARAM_STATIC_STRINGS.

	* app/*/*.c: use them for all object properties so their
	strings are not copied.
2006-01-18 20:29:40 +00:00
Michael Natterer 5d8b25a27d variant of gimp_config_connect() which allows the connected objects to
2006-01-14  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-utils.[ch] (gimp_config_connect_full):
	variant of gimp_config_connect() which allows the connected
	objects to have different propertynames.

	* app/widgets/widgets-enums.[ch]: removed enum GimpViewType...

	* app/core/core-enums.[ch]: ...and added it here.

	* app/widgets/gimpviewablebutton.[ch] (gimp_viewable_button_new):
	added "button_preview_size" parameter so the button and popup
	preview sizes can be specified separately.

	* app/widgets/gimptemplateeditor.c: changed accordingly.

	* app/widgets/gimpviewablebox.[ch] (gimp_prop_*_box_new):
	new functions which take additional "view_type_prop" and
	"view_size_prop" parameters and sync the passed context's
	properties with the resp. properties of the viewable button.

	* app/paint/gimppaintoptions.[ch]
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimptextoptions.[ch]: added view-type and view-size
	properties to the options objects and use the new viewable box
	constructors so the selected view types and sizes are persistant
	across sessions. Fixes bug #315443.
2006-01-14 00:09:22 +00:00
Michael Natterer fed433607d app/paint/gimpconvolve.c (gimp_convolve_register) fixed stock IDs.
2005-12-27  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpconvolve.c (gimp_convolve_register)
	* app/paint/gimpdodgeburn.c (gimp_dodge_burn_register): fixed
	stock IDs.
2005-12-27 20:51:24 +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
Sven Neumann 6a0267b65e changed description of GIMP_CLONE_ALIGN_NO enum value.
2005-12-16  Sven Neumann  <sven@gimp.org>

	* app/paint/paint-enums.[ch]: changed description of
	GIMP_CLONE_ALIGN_NO enum value.

	* app/tools/gimpclonetool.c (gimp_clone_options_gui): use a combo
	box for the align mode.
2005-12-16 14:44:25 +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 77697d70cf allocate both oversize buffers with the right size, instead of one twice
2005-10-29  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpconvolve.c (gimp_convolve_motion): allocate both
	oversize buffers with the right size, instead of one twice with
	the wrong size. Was broken since porting to pixel_region_init_data().
	Spotted by Seth Burgess. Fixes bug #317340.
2005-10-29 00:57:58 +00:00
Sven Neumann 572f255c5b INSTALL handle gimpprint just like other libraries. It doesn't make sense
2005-10-28  Sven Neumann  <sven@gimp.org>

	* INSTALL
	* configure.in: handle gimpprint just like other libraries. It
	doesn't make sense any longer to require it.

	* app/paint/gimpink-blob.c: commented out unused code.
2005-10-28 13:21:19 +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 6da6824c18 app/paint/gimppaintcore.h app/tools/gimpimagemaptool.c indentation fixes.
2005-09-24  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.h
	* app/tools/gimpimagemaptool.c
	* tools/test-clipboard.c: indentation fixes.
2005-09-24 16:17:45 +00:00
Michael Natterer 8dcebeaa7a replaced manual calculation of the offset of a pixel in a tile (marked as
2005-09-03  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.c (gimp_paint_core_get_orig_image)
	(gimp_paint_core_get_orig_proj): replaced manual calculation of
	the offset of a pixel in a tile (marked as /* dubious... */ for a
	reason) by simply using the offset parameters of tile_data_pointer().
2005-09-03 20:39:17 +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
Jens Seidel d08ae844d3 fixed a typo: s/occured/occurred/g 2005-08-21 20:28:05 +00:00
Michael Natterer 6c7027a640 app/paint/gimppencil.h app/paint/gimppenciloptions.[ch]
2005-08-21  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppencil.h
	* app/paint/gimppenciloptions.[ch]
	* app/widgets/widgets-types.h
	* app/widgets/gimptooldialog.h: don't simply typedef object
	instance structs which add no members as their parent instance
	structs. Give them their own instance structs.  Fixes gtk-doc
	confusion.
2005-08-21 17:31:32 +00:00
Michael Natterer 6dbac4fae1 app/paint/gimppencil.h app/paint/gimppenciloptions.h
2005-08-21  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppencil.h
	* app/paint/gimppenciloptions.h
	* app/widgets/widgets-types.h
	* app/widgets/gimptooldialog.h: don't simply typedef object
	instance structs which add no members as their parent instance
	structs. Give them their own instance structs.  Fixes gtk-doc
	confusion.
2005-08-21 17:28:18 +00:00
Michael Natterer 4fb1743f55 renamed puclic functions, defines and enums to live in a proper "boundary"
2005-08-20  Michael Natterer  <mitch@gimp.org>

	* app/base/boundary.[ch]: renamed puclic functions, defines and
	enums to live in a proper "boundary" namespace. Cleaned up and
	simplified internal code even more.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimplayer-floating-sel.c
	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimppainttool.c: changed accordingly.
2005-08-20 15:46:37 +00:00