gimp/app/tools/gimprectangleselectoptions.h
Michael Natterer 1ee6516d52 Applied modified patch from Martin Nordholts which adds a "Rounded
2006-10-18  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Martin Nordholts which adds a "Rounded
	Corners" option to the rectangle select tool. Fixes bug #86279.

	* app/core/gimpchannel-combine.[ch]: added
	gimp_channel_combine_ellipse_rect(). Use it from
	gimp_channel_combine_ellipse().

	* app/core/gimpchannel-select.[ch]: added
	gimp_channel_select_round_rect()

	* app/tools/gimprectangleselectoptions.[ch]: added properties
	"round-corners" and "corner-radius" and GUI for the new propeties.

	* app/tools/gimprectangleselecttool.h: added macro
	GIMP_RECT_SELECT_TOOL_GET_OPTIONS().

	* app/tools/gimprectangleselecttool.c (gimp_rect_select_tool_draw):
	draw round corners if enabled.

	(gimp_rect_select_tool_real_select): use
	gimp_channel_select_round_rect() if enabled.

	* app/tools/gimpselectionoptions.[ch]: added "antialias_toggle"
	to the GimpSelectionOptions struct so the rect select options
	can set its sensitivity.

	Unrelated:

	* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
	use 360 * 64 instead of 23040.
2006-10-18 18:54:28 +00:00

52 lines
2.1 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_RECT_SELECT_OPTIONS_H__
#define __GIMP_RECT_SELECT_OPTIONS_H__
#include "gimpselectionoptions.h"
#define GIMP_TYPE_RECT_SELECT_OPTIONS (gimp_rect_select_options_get_type ())
#define GIMP_RECT_SELECT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_RECT_SELECT_OPTIONS, GimpRectSelectOptions))
#define GIMP_RECT_SELECT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_RECT_SELECT_OPTIONS, GimpRectSelectOptionsClass))
#define GIMP_IS_RECT_SELECT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_RECT_SELECT_OPTIONS))
#define GIMP_IS_RECT_SELECT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_RECT_SELECT_OPTIONS))
#define GIMP_RECT_SELECT_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_RECT_SELECT_OPTIONS, GimpRectSelectOptionsClass))
typedef struct _GimpRectSelectOptions GimpRectSelectOptions;
typedef struct _GimpToolOptionsClass GimpRectSelectOptionsClass;
struct _GimpRectSelectOptions
{
GimpSelectionOptions parent_instence;
gboolean round_corners;
gdouble corner_radius;
};
GType gimp_rect_select_options_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_rect_select_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_RECT_SELECT_OPTIONS_H__ */