Commit graph

95 commits

Author SHA1 Message Date
Michael Natterer f71fd9f878 changed PROJ_ROUND() macros to use RINT() so they work correctly with
2008-03-05  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.h: changed PROJ_ROUND() macros to
	use RINT() so they work correctly with negative numbers.

	* app/tools/gimpdrawtool.c
	(gimp_draw_tool_draw_line)
	(gimp_draw_tool_draw_dashed_line)
	(gimp_draw_tool_draw_rectangle)
	(gimp_draw_tool_draw_arc)
	(gimp_draw_tool_draw_boundary): use floating-point coordinate
	transform functions again. These functions were changed to use
	integer transform functions in 2004 (!!) which broke sub-pixel
	precision drawing for stuff like straight-line and blend tool
	and also sub-pixel drawing of the brush outline.

	Should be backported to 2.4 after it has shown no ill effects in
	trunk.


svn path=/trunk/; revision=25036
2008-03-05 16:37:43 +00:00
Michael Natterer a384cca5f3 app/display/gimpdisplayshell-transform.[ch]
2008-02-26  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-transform.[ch]
	(gimp_display_shell_transform_points)
	* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_lines): take
	arrays of GimpVector2 instead of arrays of gdouble to represent
	the input points.

	* app/display/gimpdisplayshell-draw.c
	* app/tools/gimppolygonselecttool.c
	* app/tools/gimpfreeselecttool.c: don't cast the GimpVector2 arrays
	to double arrays when passing them to above functions.

	* app/tools/gimpiscissorstool.c: create a temporary GimpVector2
	array instead of a temporary gdouble array.


svn path=/trunk/; revision=24979
2008-02-26 17:30:33 +00:00
Martin Nordholts 2ce790a8a5 Don't use any dead areas in narrow-mode, and adjust constants a bit.
2007-11-06  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_handle_sizes): Don't use any dead
	areas in narrow-mode, and adjust constants a bit.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): Adjusted
	to always draw side handles in narrow mode without dead areas.

svn path=/trunk/; revision=24077
2007-11-06 22:04:18 +00:00
Martin Nordholts c902d7bc74 Put GimpRectangleTool handles on the outside of the rectangle when it has
2007-11-04  Martin Nordholts  <martinn@svn.gnome.org>

	Put GimpRectangleTool handles on the outside of the rectangle when
	it has a small width or height. Some polishing left to do but the
	base functionality works nicely.

	* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_corner): Add a
	put_outside boolean parameter that if true draws the handles on
	the outside of the rectangle.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_update_handle_sizes)
	(gimp_rectangle_tool_coord_on_handle)
	(gimp_rectangle_tool_draw): Take into account if the rectangle is
	in narrow-mode or not.

svn path=/trunk/; revision=24053
2007-11-04 14:10:56 +00:00
Michael Natterer de65da8d96 depend on glib 2.14.1
2007-10-31  Michael Natterer  <mitch@gimp.org>

	* configure.in: depend on glib 2.14.1

	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-import.c: use g_slice_dup() instead of
	g_slice_new() and memcpy().


svn path=/trunk/; revision=24014
2007-10-31 10:59:44 +00:00
Sven Neumann 96a46d0d70 Fix bug #491272 (no cursor drawn for small brush sizes):
2007-10-29  Sven Neumann  <sven@gimp.org>

	Fix bug #491272 (no cursor drawn for small brush sizes):

	* app/tools/gimpbrushtool.[ch]
	(gimp_brush_tool_draw_brush): don't draw the brush outline if it
	becomes too small. Instead draw a small cross, but only if
	"draw_fallback" was passed as TRUE.
	(gimp_brush_tool_draw_brush): pass TRUE for "draw_fallback" if
	cursor drawing is disabled for the paint tools.

	* app/tools/gimpsourcetool.c (gimp_source_tool_draw): pass FALSE
	for "draw_fallback".

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_cross_by_anchor):
	draw a symmetric cross for odd handle sizes.

svn path=/trunk/; revision=23984
2007-10-29 17:17:14 +00:00
Sven Neumann a2c401b0f6 changed the highlighting of the side handles to follow changes in the
2007-07-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): changed
	the highlighting of the side handles to follow changes in the
	specification.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): cosmetics.

svn path=/trunk/; revision=22867
2007-07-05 11:49:00 +00:00
Martin Nordholts 25fca1a6e2 Started taking GimpRectangleTool towards the new specification. The side
2007-06-30  Martin Nordholts  <martinn@svn.gnome.org>

	Started taking GimpRectangleTool towards the new specification.
	The side handles now have the same width and height as the
	corresponding corner handles, and the size of the side handles do
	not span across the whole rectangle. Side handles also have a
	limited mimimum size, just as corner handles.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_oper_update,
	gimp_rectangle_tool_draw, gimp_rectangle_tool_configure,
	gimp_rectangle_tool_get_anchor): Changed accordingly.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_corner): Changed
	accordingly.

svn path=/trunk/; revision=22856
2007-06-30 18:13:41 +00:00
Sven Neumann ade4dd09d5 formatting
svn path=/trunk/; revision=22660
2007-05-30 11:56:52 +00:00
Mukund Sivaraman f67306c1d3 Added missing include.
2007-05-30  Mukund Sivaraman  <muks@mukund.org>

        * app/tools/gimpdrawtool.c: Added missing include.

        * app/tools/gimpbycolorselecttool.c: Removed unused variable.

        * app/plug-in/gimpenvirontable.c: Added cast for callback function.

        * plug-ins/script-fu/tinyscheme/scheme.c: Correctly cast pointer to
        an long integer type.


svn path=/trunk/; revision=22659
2007-05-30 11:49:14 +00:00
Sven Neumann 2027fdf9ab use GSlice to allocate the transform matrix.
2007-05-29  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.c: use GSlice to allocate the transform
	matrix.

svn path=/trunk/; revision=22652
2007-05-29 09:44:31 +00:00
Michael Natterer f9d9ecfd7a fixed off-by-one (too large) drawing of boundaries by copying the resp.
2007-05-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary): fixed
	off-by-one (too large) drawing of boundaries by copying the resp.
	code and its obscure comment from gimpdisplayshell-selection.c
	Fixes bug #416432.


svn path=/trunk/; revision=22417
2007-05-05 04:33:38 +00:00
Sven Neumann e2b83b288c app/tools/gimpdrawtool.[ch] app/tools/gimpperspectiveclonetool.c compare
2007-03-30  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch]
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimptransformtool.c: compare squared distances.

svn path=/trunk/; revision=22198
2007-03-30 09:41:18 +00:00
Michael Natterer 83d3a750d4 include "libgimpmath/gimpmathtypes.h" instead of "libgimpmath/gimpmath.h".
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
	instead of "libgimpmath/gimpmath.h".

	* app/core/gimpbrush.h
	* app/paint/gimppaintcore.h
	* app/paint/gimpperspectiveclone.h
	* app/text/gimptext.h
	* app/tools/gimptransformtool.h: include gimpvector.h and
	gimpmatrix.h explicitely where they are needed in public structs.

	* app/*/*.c
	* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
	where needed.

	* app/pdb/paths_cmds.c: regenerated.


svn path=/trunk/; revision=22084
2007-03-09 13:00:01 +00:00
Michael Natterer 974a74004f remove useless includes. Some minor cleanup.
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: remove useless includes. Some minor cleanup.


svn path=/trunk/; revision=22083
2007-03-09 11:10:40 +00:00
Michael Natterer 8398ed8735 maintain an is_drawn boolean which indicates whether the drawn stuff is
2007-01-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: maintain an is_drawn boolean which
	indicates whether the drawn stuff is currently visible. Added
	gimp_draw_tool_is_drawn() to obtain it.

	* app/tools/gimpbrushtool.c (gimp_brush_tool_draw): don't create
	the brush outline segments for the purpose of undrawing (if we
	don't have the segments, we can hardly have drawn them before).
	Fixes artifacts when the brush is being scaled or changed.

	* app/core/gimpbrush.c: don't call brush_scale_mask() and
	brush_scale_pixmap() with zero width or height. Fixes warnings
	from these functions.


svn path=/trunk/; revision=21749
2007-01-21 19:54:57 +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
Sven Neumann 6577834f1f app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_corner) highlight the
2006-11-06  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_corner)
	* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw):
	highlight the handles on mouse-over.
2006-11-06 17:09:07 +00:00
Sven Neumann e192b27f6d let gimp_draw_tool_draw_corner() also handle north, south, east and west
2006-11-06  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch]: let gimp_draw_tool_draw_corner()
	also handle north, south, east and west corners and allow for
	filled corners.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): simplified.
2006-11-06 16:31:11 +00:00
Sven Neumann 194f268f89 app/tools/gimpdrawtool.[ch] changed the way that the handles are drawn.
2006-11-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch]
	* app/tools/gimprectangletool.c: changed the way that the
handles
	are drawn. This is still work in progress.
2006-11-06 08:16:31 +00:00
William Skaggs 7903feff20 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/display/gimpcanvas.[ch]
	* app/tools/gimpdrawtool.[ch]: remove recently added code relating
	to stippled xor drawing -- not handled well by some display
	drivers.

	* app/tools/gimprectangletool.c: improve drawing of handles.
2006-09-20 20:23:49 +00:00
William Skaggs 3c2c165b9c Bill Skaggs <weskaggs@primate.ucdavis.edu>
Trying to implement some usability recommendations from
	Peter Sikking: bigger handles, more feedback to user.

	* app/display/gimpcanvas.[ch]: add
	GIMP_CANVAS_STYLE_XOR_STIPPLED to set of styles.

	* app/tools/gimpdrawtool.[ch]
	(gimp_draw_tool_draw_rectangle_stippled): new function.
	Needs a better stipple pattern, though.

	* app/tools/gimprectangletool.c: bigger handles in corners,
	and highlight thing that user is currently moving.
2006-09-15 00:01:59 +00:00
Sven Neumann f29b6c5027 use the new transform functions.
2006-08-09  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-draw.c (gimp_display_shell_draw_pen)
	(gimp_display_shell_draw_vector): use the new transform functions.

	* app/tools/gimpdrawtool.c  (gimp_draw_tool_draw_lines)
	(gimp_draw_tool_draw_strokes): bail out early if num_points == 0.
2006-08-09 13:40:21 +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 615ad68d78 documentation based on a patch from Tom Lechner (bug #346959).
2006-07-10  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.c: documentation based on a patch from
	Tom Lechner (bug #346959).
2006-07-10 07:21:09 +00:00
Michael Natterer ff1d2973ac added virtual functions GimpTool::has_display(), which returns whether any
2006-06-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: added virtual functions
	GimpTool::has_display(), which returns whether any tool subclass
	keeps a pointer to the passed display; and GimpTool::has_image()
	which returns a display based on a passed image, or NULL if no
	display matches. Added default implementation of
	GimpTool::control() which sets tool->display to NULL on HALT.

	* app/tools/gimpclonetool.c
	* app/tools/gimpdrawtool.c: implement both functions.

	* app/tools/gimpclonetool.c: removed weak pointer hacks that are
	no longer needed now (and were incomplete anyway).

	* app/tools/tool_manager.c (tool_manager_select_tool)
	(tool_manager_control_active)
	(tool_manager_image_clean_dirty): use the new functions instead of
	peeking around in tool subclasses (and forgetting tools that may
	have display pointers, like the clone tool)

	* app/display/gimpdisplay.c (gimp_display_delete): removed
	fiddling with tool internals here too, control(HALT) on the tool
	is now sufficient to remove any reference to the closed display.
2006-06-18 19:58:49 +00:00
Michael Natterer 64032cbaca subtract 1 from outlined width/height instead of adding 1 to filled.
2006-06-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c
	(gimp_draw_tool_draw_rectangle_by_anchor)
	(gimp_draw_tool_draw_arc_by_anchor): subtract 1 from outlined
	width/height instead of adding 1 to filled.
2006-06-05 21:39:23 +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 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
Michael Natterer 4d4873a581 Silence compiler warnings about...
2006-04-02  Michael Natterer  <mitch@gimp.org>

	Silence compiler warnings about...

	* app/config/gimprc-unknown.c: ...unused return value of
	g_slist_concat().

	* app/tools/gimpdrawtool.c: ...uninitialized variabe.

	* app/xcf/xcf-save.c: ...pointer signedness.
2006-04-02 18:19:48 +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 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
Akkana Peck c938072948 Fix the parameter check at the beginning of gimp_draw_tool_draw_boundary,
* app/tools/gimpdrawtool.c: Fix the parameter check at the
beginning of gimp_draw_tool_draw_boundary, to fix the crash
described in bug 313922.
2005-08-20 04:01:13 +00:00
Sven Neumann 97075bf406 added some const qualifiers.
2005-07-31  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch]: added some const qualifiers.
2005-07-31 16:05:06 +00:00
Tor Lillqvist 8cf79496a2 Store the GimpBrushCore::brush_bound_segs as sorted (the result of
2005-06-26  Tor Lillqvist  <tml@novell.com>

	* app/tools/gimppainttool.c (gimp_paint_tool_draw): Store the
	GimpBrushCore::brush_bound_segs as sorted (the result of
	sort_boundary), as the only place where it is used
	(gimp_draw_tool_draw_boundary()) would sort it each time it is
	called anyway.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary):
	Correspondingly we now don't have to sort the boundary here.
2005-06-26 16:51:13 +00:00
Tor Lillqvist de642dd10f Add new GimpCanvasStyle value, GIMP_CANVAS_STYLE_XOR_DOTTED.
2005-06-24  Tor Lillqvist  <tml@novell.com>

	* app/display/gimpcanvas.h: Add new GimpCanvasStyle value,
	GIMP_CANVAS_STYLE_XOR_DOTTED.

	* app/display/gimpcanvas.c (gimp_canvas_gc_new): Implement it like
	GIMP_CANVAS_STYLE_XOR_DASHED, except that we set the dash pattern
	to a single-pixel on-off one.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary): Sort
	the boundary so that we can draw each connected group of segments
	using gimp_canvas_draw_lines(). (Even if we would still use
	gimp_canvas_draw_segments(), the boundary would have to be sorted
	so that the XOR drawing and GDK_CAP_NOT_LAST cooperate properly.)

	Use GIMP_CANVAS_STYLE_XOR_DOTTED so the outline doesn't look too
	heavy.

	Remove the dubious code snippet that offset some segments by one
	pixel. It didn't do what the comment claimed, and why one would
	need to do what the comment said, or what it actually did, is
	unclear.

	Now brush outlines shouldn't have gaps any longer. (#308710)
2005-06-24 23:28:38 +00:00
Manish Singh 5d01581069 Fix a bunch of warnings from Sparse:
2004-11-13  Manish Singh  <yosh@gimp.org>

        Fix a bunch of warnings from Sparse:

        * app/actions/dockable-commands.c
        * app/actions/layers-actions.c
        * app/actions/view-commands.c
        * app/base/pixel-surround.c
        * app/config/gimpconfig-utils.c
        * app/config/gimpscanner.c
        * app/core/gimpbrushgenerated.c
        * app/core/gimpcontainer.c
        * app/core/gimpimage.c
        * app/dialogs/palette-import-dialog.c
        * app/file/gimprecentlist.c
        * app/plug-in/plug-in-params.c
        * app/text/gimptext-compat.c
        * app/text/gimptext-parasite.c
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpstroke.c
        * app/widgets/gimpcellrendereraccel.c
        * app/widgets/gimpselectiondata.c
        * app/xcf/xcf.c
        * libgimp/gimp.c
        * libgimpthumb/gimpthumb-utils.c
        * libgimpthumb/gimpthumbnail.c
        * modules/cdisplay_proof.c
        * plug-ins/Lighting/lighting_ui.c
        * plug-ins/common/csource.c
        * plug-ins/common/glasstile.c
        * plug-ins/common/nova.c
        * plug-ins/common/pcx.c
        * plug-ins/common/pnm.c
        * plug-ins/common/randomize.c
        * plug-ins/common/screenshot.c
        * plug-ins/common/sel_gauss.c
        * plug-ins/common/spheredesigner.c
        * plug-ins/common/wind.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gimpressionist/gimpressionist.c
        * plug-ins/ifscompose/ifscompose.c
        * plug-ins/print/gimp_main_window.c
        * plug-ins/print/print.c: Cleanup integer vs. pointer confusion.

        * app/base/temp-buf.c
        * app/dialogs/about-dialog.c
        * plug-ins/common/bumpmap.c
        * plug-ins/common/jigsaw.c
        * plug-ins/gfig/gfig-dobject.c: Cosmetic cleanups.

        * app/config/gimpconfig-deserialize.c
        * app/config/gimpconfig-path.c
        * app/config/gimpconfigwriter.c
        * app/core/gimpgradient.c
        * app/tools/gimpdrawtool.c
        * plug-ins/common/nlfilt.c
        * plug-ins/common/unsharp.c
        * plug-ins/common/zealouscrop.c: Define inline functions before they
        are used.

        * app/core/gimpdrawable-blend.c: PixelRegion definition was changed
        some time ago, but the initialization here didn't change. Fix it.

        * app/plug-in/plug-in-rc.c (plug_in_extra_deserialize): No need to
        assign token twice in a row.

        * libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories): No
        need to initialize file_data, since the code fills out all the fields.

        * plug-ins/common/CML_explorer.c
        * plug-ins/common/vpropagate.c: Declare function pointers fully.

        * plug-ins/common/grid.c (pix_composite): G_INLINE_FUNC isn't needed,
        we assume we can use the "inline" keyword always.

        * plug-ins/common/psd_save.c
        * plug-ins/common/vinvert.c
        * plug-ins/gfig/gfig-arc.c
        * plug-ins/gfig/gfig-bezier.c
        * plug-ins/gfig/gfig-circle.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gfig/gfig-ellipse.c
        * plug-ins/gfig/gfig-line.c
        * plug-ins/gfig/gfig-poly.c
        * plug-ins/gfig/gfig-spiral.c
        * plug-ins/gfig/gfig-star.c
        * plug-ins/gfig/gfig.c
        * plug-ins/gimpressionist/orientmap.c
        * plug-ins/gimpressionist/placement.c
        * plug-ins/gimpressionist/sizemap.c
        * plug-ins/imagemap/imap_grid.c
        * plug-ins/imagemap/imap_main.c
        * plug-ins/imagemap/imap_preferences.c
        * plug-ins/imagemap/imap_settings.c
        * plug-ins/maze/maze.c
        * plug-ins/sel2path/curve.c
        * plug-ins/sel2path/fit.c
        * plug-ins/sel2path/pxl-outline.c
        * plug-ins/sel2path/spline.c
        * plug-ins/xjt/xjt.c: Functions with no args should be declared
        with (void).

        * plug-ins/common/retinex.c (MSRCR): Initialize max_preview to quiet
        the compiler.
2004-11-14 02:50:33 +00:00
Michael Natterer de7a940501 app/config/gimpconfig-deserialize.c app/config/gimpscanner.c
2004-05-12  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpscanner.c
	* app/core/gimp-edit.c
	* app/core/gimpchannel-combine.c
	* app/core/gimpcontainer.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-combine.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-projection.c
	* app/core/gimpimage.c
	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpprogress.c
	* app/gui/info-dialog.c
	* app/gui/module-browser.c
	* app/gui/offset-dialog.c
	* app/plug-in/plug-in.c
	* app/tools/gimpdrawtool.c
	* app/tools/tool_manager.c
	* app/widgets/gimpactiongroup.c
	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemfactory.c
	* app/widgets/gimppropwidgets.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-save.c
	* libgimp/gimpexport.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimpunitmenu.c: replaced G_GNUC_FUNCTION,
	G_GNUC_PRETTY_FUNCTION, G_STRLOC and hardcoded function names in
	g_warning()s by G_STRFUNC.
2004-05-12 08:13:33 +00:00
Pedro Gimeno 9127a54dec Fixed several off-by-one problems in display:
2004-03-20  Pedro Gimeno  <pggimeno@wanadoo.es>

	Fixed several off-by-one problems in display:

	* app/display/gimpdisplayshell.h (PROJ_ROUND): New macro to apply
	to a float the same rounding method as the one used when rendering.
	(SCALEX, SCALEY): Use PROJ_ROUND instead of truncating.

	* app/display/gimpdisplayshell-transform.c
	(gimp_display_shell_transform_xy): Accept gdouble image coordinates
	even if the returned screen coordinates are integer. Use PROJ_ROUND
	instead of (gint) to apply proper rounding. Fixes bug #137566.

	* app/display/gimpdisplayshell-transform.h
	(gimp_display_shell_transform_xy): changed accordingly.

	* app/display/gimpdisplayshell-draw.c
	* app/tools/gimpdrawtool.c: make sure everywhere that PROJ_ROUND
	is used either directly or through gimp_display_shell_transform_xy,
	instead of using arbitrary rounding methods.
2004-03-20 21:59:41 +00:00
Michael Natterer 79e13a1ca0 app/tools/gimpdrawtool.c app/tools/gimpselectiontool.c
2004-03-10  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptool.c
	* app/tools/gimptransformtool.c: minor cleanup.
2004-03-10 12:45:11 +00:00
Simon Budig 331f982322 added "use_offsets" parameter to gimp_draw_tool_draw_boundary() for
2004-02-21  Simon Budig  <simon@gimp.org>

	* app/tools/gimpdrawtool.[ch]: added "use_offsets" parameter
	to gimp_draw_tool_draw_boundary() for consistency.

	* app/tools/gimpeditselectiontool.c: Changed accordingly.

	* app/tools/gimppainttool.c: when drawing straight lines draw
	the brush preview at the end of the line.
2004-02-21 16:06:56 +00:00
Sven Neumann 058764f4ba app/display/gimpcanvas.[ch] moved GC from the the draw tool to GimpCanvas.
2003-11-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpcanvas.[ch]
	* app/tools/gimpdrawtool.[ch]: moved GC from the the draw tool to
	GimpCanvas. Added wrappers around GDK drawing functions and do all
	canvas drawing by means of these new functions.

	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpfuzzyselecttool.c: draw using the new GimpCanvas
	functions.
2003-11-10 19:35:56 +00:00
Simon Budig eb489c44c4 Made these widgets show a preview of the vectors object. Does not work
2003-09-29  Simon Budig  <simon@gimp.org>

	* app/widgets/gimppreviewrenderervectors.c: Made these widgets
	show a preview of the vectors object. Does not work everywhere
	right now, also most probably has scaling issues for non-square
	images.

	* app/tools/gimpdrawtool.c: Fixed Svens fix.
2003-09-29 11:48:15 +00:00
Sven Neumann 30a4f72166 plugged memleaks and added some sanity checks.
2003-09-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.c (gimp_scan_convert_free)
	(gimp_scan_convert_finish): plugged memleaks and added some sanity
	checks.

	* app/base/pixel-region.c
	* app/core/gimpdrawable-preview.c: removed trailing whitespace.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_on_vectors_curve):
	gimp_stroke_nearest_point_get() doesn't set cur_pos when there are
	no strokes; don't use the uninitialized variable.
2003-09-28 20:13:59 +00:00
Simon Budig 3b1c873724 app/vectors/gimpstroke.[ch] added the endpoint of the segment to the list
2003-09-18  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpbezierstroke.c: (gimp_stroke_nearest_point_get)
	added the endpoint of the segment to the list of returned values.

	* app/tools/gimpdrawtool.[ch]: (gimp_draw_tool_on_vectors_curve)
	return the endpoint also.

	* app/tools/gimpvectortool.[ch]: Use that to activate the
	to-be-changed anchors when dragging on the curve directly.

	* app/tools/gimpmovetool.[ch]: changed accordingly.
2003-09-18 13:20:40 +00:00
Simon Budig 66cc2b98b5 app/vectors/gimpstroke.[ch] Changed gimp_*_anchor_select to accept the
2003-09-17  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpvectors.[ch]: Changed gimp_*_anchor_select to
	accept the selection state as an argument.

	* app/tools/gimpdrawtool.[ch]: Added "exclusive" boolean parameter
	to gimp_draw_tool_on_vectors_handle(), so that you can specify
	that you just get exactly the type of anchor you want to have.

	* app/tools/gimpvectortool.[ch]: Handling of multiple selected
	anchors: Shift-Clicking in Extend mode selects them, you can
	move them together.
2003-09-17 21:49:45 +00:00
Simon Budig e899c701ba Implemented an (unused/untested) gimp_vectors_bounds () that returns the
2003-09-16  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.[ch]: Implemented an (unused/untested)
	gimp_vectors_bounds () that returns the bounding box of an vectors
	object.

	* app/tools/gimpdrawtool.[ch]: made gimp_draw_tool_on_vectors()
	ignore handles/anchors, since they are not visible when that
	function gets used.
2003-09-15 22:41:25 +00:00