Commit Graph

183 Commits

Author SHA1 Message Date
Sven Neumann bc159e1c93 app/tools/gimpiscissorstool.c (gradmap_tile_validate) (find_max_gradient)
2007-06-25  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gradmap_tile_validate)
	(find_max_gradient) minor code cleanup.


svn path=/trunk/; revision=22829
2007-06-25 07:04:42 +00:00
Sven Neumann 8755f459ac minor code cleanup.
2007-06-25  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gradmap_tile_validate): minor
	code cleanup.


svn path=/trunk/; revision=22828
2007-06-25 06:57:31 +00:00
Sven Neumann 610feafb3e app/base/base-types.h app/base/tile-manager.[ch] removed accessors for
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/base/base-types.h
	* app/base/tile-manager.[ch]
	* app/base/tile-manager-private.h: removed accessors for user_data.
	Instead pass the user_data when setting the validation proc.

	* app/base/tile-pyramid.c
	* app/core/gimpchannel.c
	* app/core/gimpprojection.c
	* app/core/gimpselection.c
	* app/tools/gimpiscissorstool.c: changed accordingly.

svn path=/trunk/; revision=22820
2007-06-21 14:36:58 +00:00
Sven Neumann 50e8d93b54 free live-wire Curve segment using g_slice_free().
2007-06-18  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gimp_iscissors_tool_draw): free
	live-wire Curve segment using g_slice_free().


svn path=/trunk/; revision=22799
2007-06-18 19:58:06 +00:00
Sven Neumann ac2f30c485 use a GQueue to store the points.
2007-05-23  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.[ch]: use a GQueue to store the points.

svn path=/trunk/; revision=22597
2007-05-23 14:56:21 +00:00
Sven Neumann ab71eb9f6a app/paint/gimppaintoptions.c app/tools/gimpcolorbalancetool.c
2007-05-23  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintoptions.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimprectangleoptions.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/tool_manager.c: allocate structs using GSlice.

svn path=/trunk/; revision=22595
2007-05-23 13:49:06 +00:00
Michael Natterer d7ed63948c Step one towards enabling tool cancellation by other means than mouse
2007-02-27  Michael Natterer  <mitch@gimp.org>

	Step one towards enabling tool cancellation by other means than
	mouse button 3 and towards proper "clicked" semantics.

	* app/tools/tools-enums.[ch]: added enum GimpButtonReleaseType
	which can be one of { NORMAL, CANCEL, CLICK } (click is curently
	unused).

	* app/tools/gimptool.[ch] (GimpTool::button_release): added
	"release_type" parameter.

	(gimp_tool_button_release): if the state contains
	GDK_BUTTON3_MASK, call the tool's button_release() with CANCEL,
	use NORMAL otherwise.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c (button_release): added
	"release_type" parameters and get rid of own checks for
	GDK_BUTTON3_MASK.


svn path=/trunk/; revision=22015
2007-02-27 18:55:12 +00:00
Raphael Quinet ed5a568581 app/tools/gimpiscissorstool.h Added some status bar messages. Use
2007-01-19  Raphael Quinet  <raphael@gimp.org>

	* app/tools/gimpiscissorstool.h
	* app/tools/gimpiscissorstool.c: Added some status bar messages.
	Use ISCISSORS_OP_CONNECT to let the user know when the cursor is
	above the first point and the user can connect and close the
	curve.  Allow the user to press Enter or Escape to confirm the
	selection or cancel the tool.  Fixes bug #398309.

svn path=/trunk/; revision=21734
2007-01-19 09:32:35 +00:00
Sven Neumann 541c8af049 app/core/gimp-documents.c app/core/gimp-parasites.c
2006-12-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-documents.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/widgets/gimpcontrollers.c: changed the header that is
	written to config files that are rewritten on exit.

	* app/tools/gimpiscissorstool.c: comment.
2006-12-22 10:09:09 +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
Sven Neumann b41bc68023 improved highlighting. (gimp_draw_tool_draw_arc_by_anchor): take width and
2006-11-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_corner):
	improved highlighting.
	(gimp_draw_tool_draw_arc_by_anchor): take width and height
	arguments instead of radius_x and radius_y.

	* app/tools/gimpiscissorstool.c
	* app/tools/gimpvectortool.c: slightly increased handle sizes.

	* app/tools/gimpmeasuretool.c: increased size of the end points.

	* app/tools/gimpperspectiveclonetool.c: increased handle size.

	* app/tools/gimprectangletool.c: renamed variables.

	* app/tools/gimpsourcetool.c: use a single define for the target
size.

	* app/tools/gimptransformtool.[ch]: increased handle size. Made
	the area that can be grabbed identical to the displayed handle.
	Replaced filled circle with a circle outline and a cross.

	* app/tools/gimptransformtool-undo.c: follow renaming of define
in
	gimptransformtool.h.
2006-11-07 11:09:51 +00:00
Michael Natterer 91c3d6ee7a Separate selection tool function (select, move, cut, ...) from selection
2006-10-18  Michael Natterer  <mitch@gimp.org>

	Separate selection tool function (select, move, cut, ...) from
	selection mode (replace, add, ...). Fixes bug #313634 (that bug
	wasn't triggered any more in HEAD, but was still there).

	* app/tools/tools-enums.h: renamed enum SelectOp to SelectFunction
	and replaced the values REPLACE, ADD, SUBTRACT and INTERSECT by a
	single value SELECT.

	* app/tools/gimpselectiontool.h (struct GimpSelectionTool):
	renamed member "op" to "function". Changed "SelectOps saved_op" to
	"GimpChannelOps saved_operation".

	* app/tools/gimpselectiontool.c: we always have the right
	GimpChannelOps in the tool options, so simply use it instead of
	mixing up unrelated stuff in one enum. Results is some medium-ugly
	nested switches, but is generally much cleaner than before.

	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpregionselecttool.c: changed accordingly. Use the
	operation from the tool options instead of selection_tool->op when
	making the actual selection.
2006-10-18 08:04:55 +00:00
William Skaggs 73a25c2a61 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpairbrushtool.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimphealtool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimppenciltool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimpvectortool.c:  Apply patch from J. Baker,
	with some modifications, to improve tooltips and tool
	names.  Almost fixes bug #356137.
2006-09-18 18:00:22 +00:00
Sven Neumann a03e14af1a app/composite/gimp-composite-generic.c app/core/gimpimage-convert.c
2006-09-12  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-generic.c
	* app/core/gimpimage-convert.c
	* app/actions/view-actions.c
	* app/dialogs/grid-dialog.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/palette-import-dialog.c
	* app/display/gimpnavigationeditor.c
	* app/tools/gimpiscissorstool.c
	* app/widgets/gimptoolbox-image-area.c
	* plug-ins/common/CML_explorer.c
	* plug-ins/common/apply_lens.c
	* plug-ins/common/cubism.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/exchange.c
	* plug-ins/common/fp.c
	* plug-ins/common/gif.c
	* plug-ins/common/iwarp.c
	* plug-ins/common/laplace.c
	* plug-ins/common/mapcolor.c
	* plug-ins/common/nlfilt.c
	* plug-ins/common/nova.c
	* plug-ins/common/psp.c
	* plug-ins/common/randomize.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/tga.c
	* plug-ins/common/threshold_alpha.c
	* plug-ins/common/unsharp.c
	* plug-ins/common/vpropagate.c
	* plug-ins/gfig/gfig-dialog.c
	* plug-ins/gflare/gflare.c
	* plug-ins/ifscompose/ifscompose.c: removed unused macros.
2006-09-12 11:46:10 +00:00
Michael Natterer 6c7f0c6830 added gimp_tool_get_options() so tools don't need to incude
2006-09-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: added gimp_tool_get_options() so tools
	don't need to incude "core/gimptoolinfo.h" just to get to
	their options.

	* app/tools/gimp*tool.h: added macros GIMP_FOO_TOOL_GET_OPTIONS()
	which return specific tool options types and do all casting
	themselves.

	* app/tools/*.c: use the new macros and don't include
	"core/gimptoolinfo.h" in most files.

	* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_register):
	make it use the parent context's FG and BG.

	* app/tools/gimpcolortool.c (gimp_color_tool_real_picked): set the
	color on the tool's options, not on the user context.
2006-09-05 18:25:31 +00:00
Hans Breuer 37e4b80204 updated
2006-08-15  Hans Breuer  <hans@breuer.org>

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

	* app/xcf/xcf-save.c(1464) : error C2036: 'void *' : unknown size
	pointer arithmetics on void a pointer looks like a GCC extension
	* app/tools/gimpbrightnesscontrasttool.c
	  app/tools/gimpcolorbalancetool.c
	  app/tools/gimphuesaturationtool.c
	  app/tools/gimpcolorizetool.c : #include "core/gimp.h" for gimp_message
	* app/tools/gimpiscissorstool.c : use RINT() rather than rint()
	* app/widgets/gimpcontrollerlist.c : #include "gimpwidgets-utils.h"
	for gimp_show_message_dialog
	* app/core/gimpprogress.c(229) : 'gimp_progress_message' must
	return a value
2006-08-15 15:13:08 +00:00
Michael Natterer 2c47055043 Fixed rounding and double vs. integer inconsistency when dealing with
2006-08-14  Michael Natterer  <mitch@gimp.org>

	Fixed rounding and double vs. integer inconsistency when dealing
	with mouse coordinates. Fixes bug #350694.

	* app/tools/gimpiscissorstool.c
	(clicked_on_vertex)
	(clicked_on_curve): added double x and y parameters and use them
	instead of the integer iscissors->x and ->y. Cleaned up the
	functions a bit.

	(gimp_iscissors_tool_button_press)
	(gimp_iscissors_tool_motion): changed accordingly, also rint() the
	passed mouse coords when assigning them to iscissors->x and ->y.

	Unrelated cleanup:

	(iscissors_free_buffers): removed, folded into reset()
	(precalculate_arrays): removed, folded into class_init()
2006-08-14 20:32:42 +00:00
Sven Neumann df30e50fc2 do not select ISCISSORS_OP_MOVE_POINT for terminal points. Fixes bug
2006-08-14  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gimp_iscissors_tool_oper_update):
	do not select ISCISSORS_OP_MOVE_POINT for terminal points. Fixes
	bug #132352.
2006-08-14 12:34:42 +00:00
Sven Neumann 1c33f14bcf renamed transform_coords() to transform_coordinate(); same for the
2006-08-09  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-transform.[ch]: renamed
	transform_coords() to transform_coordinate(); same for the
	untransform variant. Added new functions transform_points() and
	transform_coords() that work on arrays.

	* app/display/gimpdisplayshell-autoscroll.c
	* app/display/gimpdisplayshell-callbacks.c: changed accordingly.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_lines)
	(gimp_draw_tool_draw_strokes): use the new transform functions.
2006-08-09 13:15:49 +00:00
Sven Neumann 99f44594bd implement using gimp_draw_tool_draw_lines().
2006-08-09  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (iscissors_draw_curve):
	implement using gimp_draw_tool_draw_lines().
2006-08-09 11:15:15 +00:00
Michael Natterer 3f7b118225 cursors/Makefile.am cursors/modifier-bad.png
2006-06-01  Michael Natterer  <mitch@gimp.org>

	* cursors/Makefile.am
	* cursors/modifier-bad.png
	* cursors/xbm/modifier-bad-mask.xbm
	* cursors/xbm/modifier-bad.xbm: new "bad" cursor
	modifier. Replaces the "bad" cursor.

	* cursors/gimp-tool-cursors.xcf: added it here too.

	* app/widgets/widgets-enums.h: added GIMP_CURSOR_MODIFIER_BAD.

	* app/widgets/gimpcursor.c: add the bad modifier. Leave the bad
	cursor there for now.

	* app/display/gimpdisplayshell-callbacks.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: use the modifier instead of the
	cursor. Fixes hotspot jumping when switching between normal and
	bad cursors. The changed cursor_update() functions even make more
	sense IMHO. Fixes bug #158407.
2006-06-01 20:30:52 +00:00
Michael Natterer b3c20ed2a5 prefix with GIMP_TOOL_ACTION_
2006-05-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-enums.h (enum GimpToolAction): prefix with
	GIMP_TOOL_ACTION_

	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/tools/tool_manager.c: changed accordingly. Introduce a
	common style for GimpTool::control()'s switch() block. Some
	minor cleanups.
2006-05-21 21:12:01 +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 5439aa4995 did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gdisp -> display substitution.
2006-03-28 17:55:52 +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 2ed407b54f app/tools/gimptool.[ch] add "gboolean proximity" parameter to
2006-03-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: add "gboolean proximity" parameter
	to GimpTool::oper_update() in order to emphasize its importance
	and to avoid peeking around in the GimpDisplayShell struct.

	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly. Got rid of
	quite some "display/gimpdisplayshell.h" includes.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): pass shell->proximity to
	tool_manager_oper_update_active().
2006-03-25 14:23:09 +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 8b8c784a5b port to G_DEFINE_TYPE() and friends. Some related cleanup.
2005-12-13  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: port to G_DEFINE_TYPE() and friends. Some related
	cleanup.
2005-12-13 09:13:50 +00:00
Michael Natterer 2cddc49325 use gimp_draw_tool_on_handle() to figure if we need to close the path.
2005-09-10  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpiscissorstool.c	(gimp_iscissors_tool_button_release):
	use gimp_draw_tool_on_handle() to figure if we need to close the
	path. Makes sure that the anchor's sensitive area matches its size
	on screen. Fixes bug #134250.
2005-09-10 19:27:54 +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
Jens Seidel d08ae844d3 fixed a typo: s/occured/occurred/g 2005-08-21 20:28:05 +00:00
Michael Natterer d64bf3564f added GimpPickable::get_opacity_at()
2005-07-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppickable.[ch]: added GimpPickable::get_opacity_at()

	* app/core/gimpchannel.[ch]: removed gimp_channel_value() and
	implement ::get_opacity_at() instead.

	* app/core/gimplayer.[ch]: removed gimp_layer_pick_correlate()
	and implement ::get_opacity_at() instead.

	* app/core/gimpselection.c: GimpChannel::value() doesn't exist
	any more.

	* app/core/gimpprojection.c: implement ::get_opacity_at(), always
	returns OPAQUE.

	* app/core/gimpimage.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/selection.pdb: changed accordingly.

	* app/pdb/selection_cmds.c: regenerated.
2005-07-11 19:21:52 +00:00
Michael Natterer c49df22eef Action code review and pre-release consistency cleanup:
2004-10-18  Michael Natterer  <mitch@gimp.org>

	Action code review and pre-release consistency cleanup:

	* app/actions/*-actions.c: added some missing and resolved
	conflicting mnemonics, added missing help IDs. Cleaned up the
	*_actions_update() functions.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c (*_actions_update): simplified
	the code that figures the prev and next channel,layer,vectors.

	* app/actions/qmask-actions.c: use the same accelerator for
	"qmask-active" and "qmask-toggle". Fixed action sensitivity.

	* app/actions/channels-commands.c
	* app/actions/dockable-commands.c
	* app/actions/documents-commands.c
	* app/actions/gradients-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/image-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c: folded tons of private utility
	functions into their only callers (they used to be public and
	called from outside before the switch to action based menus).
	Renamed functions and variables saying "query" or "qbox" to
	"dialog". Moved static functions to the end of the files. Misc
	minor cleanups.

	* app/actions/drawable-actions.c
	* app/actions/drawable-commands.c: made the "drawable-visible" and
	"drawable-linked" actions affect the layer if the active drawable
	is a layer mask.

	* app/actions/select-commands.c: added action to stroke with the
	last values used in an attempt to address bug #135746 but #if 0'ed
	it because the approach is too ugly.

	* app/tools/gimpiscissorstool.c: changed mnemonic from I to S.

	* menus/image-menu-xml.in: added more stuff to the (commented out)
	"context" menu.
2004-10-18 11:29:58 +00:00
Michael Natterer bba0394529 increased the handle size from 8 to 9 pixels (which is the same as in the
2004-08-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpiscissorstool.c: increased the handle size from 8
	to 9 pixels (which is the same as in the path tool) as suggested
	in bug #134250.
2004-08-05 15:44:34 +00:00
Michael Natterer 4b582b481a Replaced the concept of having a boolean indicating if an undo step
2004-07-29  Michael Natterer  <mitch@gimp.org>

	Replaced the concept of having a boolean indicating if an undo
	step dirties the image by a bitfield indicating which parts
	of the image are dirtied:

	* app/core/core-enums.[ch]: reordered two values in enum
	GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask.

	The values of GimpDirtyMask are still questionable and will
	probably change...

	* app/core/gimpimage.[ch]: removed signal "undo_start" and added
	a GimpDirtyMask parameter to the "dirty" and "clean" signals.

	* app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced
	"gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass
	it to gimp_image_dirty().

	(gimp_image_undo_group_start): added *ugly* code which tries to
	figure GimpDirtyMask from the group's GimpUndoType and store it in
	the GimpUndoGroup. Call gimp_image_dirty() instead of the removed
	gimp_image_undo_start(). This means the undo group now dirties the
	image just like one of its undo steps, but that's no problem since
	undoing cleans it in the same way.

	* app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g

	(gimp_undo_pop): emit clean/dirty signals *before* performing the
	actual undo step so listeners can detach from the image before it
	is changed by undo.

	* app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a
	GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push().

	* app/core/gimpimagemap.[ch]: removed "gboolean interactive"
	because it makes no sense to use GimpImageMap noninteractively.
	Don't freeze()/thaw() undo while the image_map is active which
	fixes many ways of trashing the image's undo state but probably
	introduces new ways of doing evil things.

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplayshell-handlers.c: changed according
	to the GimpImage::clean()/dirty() signal changes. Small fixes
	in the quit dialog's dirty image container.

	* app/tools/gimptoolcontrol.[ch]: added member and API to
	set/get the dirty_mask.

	* app/tools/gimpcroptool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c: whenever setting "preserve" to
	FALSE, also set a "dirty_mask" which specifies on which image
	changes the tool wants to be canceled.

	* app/tools/tool_manager.c: removed "undo_start" connection and
	connect to both "dirty" *and* "clean" to check if the active_tool
	needs to be canceled. Cancel the tool only if the dirty_mask
	passed in the signal has common bits with the tool's dirty_mask.

	Fixes bug #109561 and probably opens some new ones...
2004-07-29 14:16:21 +00:00
Michael Natterer d50a2db779 renamed init_edit_selection() to gimp_edit_selection_tool_start(). Removed
2004-07-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpeditselectiontool.[ch]: renamed init_edit_selection()
	to gimp_edit_selection_tool_start(). Removed enum EditType.

	* app/tools/tools-enums.h: added enum GimpTranslateMode instead.

	* app/tools/gimpmovetool.c: changed accordingly.

	* app/tools/gimpselectiontool.[ch]: added protected utility
	function gimp_selection_tool_start_edit().

	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimprectselecttool.c: use the new function instead of
	duplicating the same code three times, don't include
	"gimpeditselectiontool.h".

	* app/tools/gimpiscissorstool.c: don't include
	"gimpeditselectiontool.h".
2004-07-26 14:50:51 +00:00
Michael Natterer c5ec0d4f70 *** empty log message *** 2004-07-13 16:36:29 +00:00
Michael Natterer 1082ee6b94 remember the last used GimpCursorFormat so changing the format in prefs
2004-06-14  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.[ch]: remember the last used
	GimpCursorFormat so changing the format in prefs applies
	instantly, and not after the next tool change.

	* app/display/gimpdisplayshell-cursor.[ch]
	* app/tools/gimptool.[ch]
	* app/tools/gimptoolcontrol.[ch]
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimptransformtool.c: s/GdkCursorType/GimpCursorType/g
2004-06-14 10:19:39 +00:00
Simon Budig a3936388bc Minor tweaks to two macros. Shouldn't change anything.
2004-06-13  Simon Budig  <simon@gimp.org>

	* app/tools/gimpiscissorstool.c: Minor tweaks to two macros.
	Shouldn't change anything.
2004-06-13 12:48:40 +00:00
Michael Natterer 714d63fcda cursors/Makefile.am cursors/cursor-none.png new empty cursor images.
2004-06-05  Michael Natterer  <mitch@gimp.org>

	* cursors/Makefile.am
	* cursors/cursor-none.png
	* cursors/xbm/cursor-none.xbm: new empty cursor images.

	* app/config/gimpdisplayconfig.[ch]
	* app/config/gimprc-blurbs.h
	* app/widgets/widgets-enums.h
	* app/widgets/gimpcursor.c
	* app/display/gimpdisplayshell-cursor.c
	* app/tools/gimppainttool.[ch]
	* app/tools/gimpinktool.c
	* app/gui/preferences-dialog.c: applied patches from Philip
	Lafleur which implement hiding the cursor completely for paint
	tools. Changed the name of the config option from
	"hide-paint-tool-cursor" to "show-paint-tool-cursor" and default
	to TRUE because this needs the brush outline being visible while
	painting to be really usable. Fixes bug #132163.

	* app/widgets/widgets-enums.h: renamed all GimpCursorType and
	GimpToolCursorType enum values to GIMP_CURSOR_* and
	GIMP_TOOL_CURSOR_*.

	* app/widgets/gimpcursor.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-cursor.c
	* app/tools/gimp*tool.c; changed accordingly.
2004-06-04 23:08:29 +00:00
Sven Neumann e0ebd94ee9 app/paint/gimpconvolve.c app/paint-funcs/paint-funcs.[ch] reverted last
2004-05-31  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpconvolve.c
	* app/paint-funcs/paint-funcs.[ch]
	* app/tools/gimpiscissorstool.c: reverted last change and applied
	new patch instead (bug #72878).
2004-05-31 10:36:06 +00:00
Sven Neumann 727ed840ab app/paint/gimpconvolve.c app/paint-funcs/paint-funcs.[ch] applied a patch
2004-05-31  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpconvolve.c
	* app/paint-funcs/paint-funcs.[ch]
	* app/tools/gimpiscissorstool.c: applied a patch from Philip
	Lafleur that fixes RGBA resampling in Convolve tool (bug #72878).
2004-05-31 07:45:50 +00:00
Michael Natterer 2a84015e39 stripped the menu paths from the "menu_path". Will be renamed to
2004-04-29  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimp*tool.c (gimp_*_tool_register): stripped the menu
	paths from the "menu_path". Will be renamed to "action_name" or
	something soon...

	* plug-ins/dbbrowser/dbbrowser.c
	* plug-ins/common/plugindetails.c
	* plug-ins/common/uniteditor.c: register under the new
	"Extensions" placeholder.
2004-04-29 13:19:28 +00:00
Sven Neumann f3c8c2ad83 don't activate the iscissors tool if it's already active (bug #132351).
2004-02-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpiscissorstool.c (gimp_iscissors_tool_button_press):
	don't activate the iscissors tool if it's already active
	(bug #132351).
2004-02-08 22:28:21 +00:00
Michael Natterer da2bd8b91a added GimpScanConvert typedef.
2003-10-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: added GimpScanConvert typedef.

	* app/core/gimpscanconvert.h: removed it here.

	* app/core/gimpchannel-select.[ch]: factored out new
	function gimp_channel_select_scan_convert().

	(gimp_channel_select_polygon)
	(gimp_channel_select_vectors): use it.

	(gimp_channel_select_alpha): when called on a layer without alpha,
	don't fail but fake the effect of a fully opaque alpha channel.

	* app/tools/gimpiscissorstool.c: some cleanup.

	(iscissors_convert): fixed my latest cleanup (don't cast the
	tool to a GimpGrawable ;). Don't ignore options->antialias.
2003-10-09 11:30:49 +00:00
Michael Natterer d734595991 create a channel which the size of the layer, not of the image...
2003-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_new_from_alpha): create
	a channel which the size of the layer, not of the image...

	* app/core/gimpchannel-select.c (gimp_channel_select_alpha):
	...and take the layer's offsets into account.

	* app/core/gimpscanconvert.[ch] (gimp_scan_convert_render): added
	off_x and off_y parameters and don't use the passed TileManager's
	offsets.

	* app/core/gimpchannel-select.c
	* app/core/gimpdrawable-stroke.c
	* app/tools/gimpiscissorstool.c: changed accordingly.
2003-10-06 16:43:05 +00:00
Michael Natterer f0372cad0f Treat changes to the selection like changes to any other drawable:
2003-10-06  Michael Natterer  <mitch@gimp.org>

	Treat changes to the selection like changes to any other drawable:

	* app/core/gimpchannel.c
	* app/core/gimpchannel-combine.c: call gimp_drawable_update() after
	changing the channel.

	* app/core/gimpimage.[ch]: added struct GimpImageFlushAccumulator
	with one member "gboolean mask_changed". Connect to "update" of
	the selection and set accum.mask_changed to TRUE in the callback.
	Added default implementation for GimpImage::flush() and emit
	"mask_changed" there.

	Unrelated:
	* app/core/gimpimage.h: removed GimpGuide struct...
	* app/core/gimpimage-guides.h: ...and added it here.

	* app/core/gimpimage-undo-push.c (undo_pop_mask)
	(undo_pop_channel_mod): don't distinguish between selection and
	non-selection channels and just call gimp_drawable_update().

	* app/core/gimpundo.h
	* app/core/gimpimage-undo.c: removed "gboolean mask_changed" from
	the GimpUndoAccumulator struct since we don't have to care about
	that signal explicitly any more.

	* app/display/gimpdisplay-foreach.[ch]: removed gimp_displays_flush().

	* tools/pdbgen/pdb/display.pdb (displays_flush_invoker): call
	gimp_image_flush() on all images so the flush accumulator is
	honored.

	This generalization enables the removal of more special purpose
	code which was needed to treat the selection different:

	* app/core/gimpimage-mask-select.[ch]: removed...

	* app/core/gimpchannel-select.[ch]: ...and added under a new name
	because it's not selection specific any more.

	* app/core/gimpimage-mask.[ch]: removed...

	* app/core/gimpselection.[ch]: ...added the two remaining
	functions here. Removed all calls to gimp_image_mask_changed().

	* app/core/Makefile.am
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/display/gimpdisplayshell.c
	* app/gui/channels-commands.c
	* app/gui/layers-commands.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly.

	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-colormap.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/gui/image-menu.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpinkoptions.c
	* app/tools/gimpvectortool.c: removed useless and/or obsolete
	#includes.

	* app/pdb/display_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c: regenerated.
2003-10-06 12:17:11 +00:00
Michael Natterer 657b49b402 removed "width", "height" and "antialias" from the GimpScanConvert struct
2003-09-30  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpscanconvert.[ch]: removed "width", "height" and
	"antialias" from the GimpScanConvert struct and from
	gimp_scan_convert_new(). Removed gimp_scan_convert_to_channel().
	Added "gboolean antialias" to gimp_scan_convert_render().
	Some general cleanup.

	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimage-mask-select.c
	* app/tools/gimpiscissorstool.c: changed accordingly.

	* app/core/gimpdrawable-stroke.c: renamed
	gimp_drawable_stroke_scanconvert_stroke() to
	gimp_drawable_stroke_scan_convert() and removed the "gboolean
	use_mask_bounds" parameter since we can't decide if it's the
	selection's boundary which is stroked. Instead use
	gimp_channel_is_empty() on the selection which will return FALSE
	while the selection is being stroked.

	* app/paint/gimppaintcore-stroke.c: cleanup.

	(gimp_paint_core_stroke_boundary): don't use "gint i" twice.

	(gimp_paint_core_stroke_vectors): no need to manually close a
	closed stroke.
2003-09-30 18:06:19 +00:00