gimp/app/paint/gimperaseroptions.h
Michael Natterer 78262ef745 removed "gboolean hard" member/property...
2003-07-14  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimperaseroptions.[ch]: removed "gboolean hard"
	member/property...

	* app/paint/gimppaintoptions.[ch]: ...and added it here. Added
	gimp_paint_options_get_brush_mode() utility function.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.h
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c: use the new utility funtion where
	appropriate. Removed trailing whitespace.

	* app/tools/gimpdrawtool.[ch] (gimp_paint_tool_draw_boundary):
	changed offset parameters from gint to gdouble so we can show the
	brush preview at sub-pixel positions.

	* app/tools/gimppainttool.c: use sub-pixel coordinates for the
	brush preview if paint_options->hard is FALSE (doesn't work for
	the pencil yet).

	The new brush preview unveiled that the positioning of even-sized
	brushes if off by 0.5 for soft brush application mode and off by
	1.0 for hard application mode:

	* app/paint/gimppaintcore.[ch] (gimp_paint_core_subsample_mask):
	offset painting by 0.5 pixels on the brushes' even sized axes by
	shuffling the subsample matrices around.

	Added "subsampling" for HARD brush application mode since a pixel
	of an even sized brush can snap to up to four different image
	pixels depending on the sub-pixel coordinates of the stroke.
2003-07-14 14:50:41 +00:00

49 lines
1.9 KiB
C

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_ERASER_OPTIONS_H__
#define __GIMP_ERASER_OPTIONS_H__
#include "gimppaintoptions.h"
#define GIMP_TYPE_ERASER_OPTIONS (gimp_eraser_options_get_type ())
#define GIMP_ERASER_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_ERASER_OPTIONS, GimpEraserOptions))
#define GIMP_ERASER_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_ERASER_OPTIONS, GimpEraserOptionsClass))
#define GIMP_IS_ERASER_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_ERASER_OPTIONS))
#define GIMP_IS_ERASER_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_ERASER_OPTIONS))
#define GIMP_ERASER_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ERASER_OPTIONS, GimpEraserOptionsClass))
typedef struct _GimpEraserOptions GimpEraserOptions;
typedef struct _GimpPaintOptionsClass GimpEraserOptionsClass;
struct _GimpEraserOptions
{
GimpPaintOptions paint_options;
gboolean anti_erase;
};
GType gimp_eraser_options_get_type (void) G_GNUC_CONST;
#endif /* __GIMP_ERASER_OPTIONS_H__ */