2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2002-02-22 00:02:30 +08:00
|
|
|
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2002-02-22 00:02:30 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2002-02-22 00:02:30 +08:00
|
|
|
* (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
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2002-02-22 00:02:30 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_PAINT_OPTIONS_H__
|
|
|
|
#define __GIMP_PAINT_OPTIONS_H__
|
|
|
|
|
|
|
|
|
2003-06-30 04:40:45 +08:00
|
|
|
#include "core/gimptooloptions.h"
|
|
|
|
|
|
|
|
|
2004-05-04 19:26:22 +08:00
|
|
|
#define GIMP_PAINT_OPTIONS_CONTEXT_MASK GIMP_CONTEXT_FOREGROUND_MASK | \
|
|
|
|
GIMP_CONTEXT_BACKGROUND_MASK | \
|
|
|
|
GIMP_CONTEXT_OPACITY_MASK | \
|
2003-06-30 04:40:45 +08:00
|
|
|
GIMP_CONTEXT_PAINT_MODE_MASK | \
|
2009-10-11 06:03:52 +08:00
|
|
|
GIMP_CONTEXT_BRUSH_MASK | \
|
2012-02-07 03:56:53 +08:00
|
|
|
GIMP_CONTEXT_DYNAMICS_MASK | \
|
|
|
|
GIMP_CONTEXT_PALETTE_MASK
|
2002-02-22 00:02:30 +08:00
|
|
|
|
|
|
|
|
2005-10-04 03:03:14 +08:00
|
|
|
typedef struct _GimpJitterOptions GimpJitterOptions;
|
2010-11-26 04:30:29 +08:00
|
|
|
typedef struct _GimpFadeOptions GimpFadeOptions;
|
2008-04-25 18:52:01 +08:00
|
|
|
typedef struct _GimpGradientOptions GimpGradientOptions;
|
2010-10-22 20:47:36 +08:00
|
|
|
typedef struct _GimpSmoothingOptions GimpSmoothingOptions;
|
2002-02-22 00:02:30 +08:00
|
|
|
|
2010-11-26 04:30:29 +08:00
|
|
|
struct _GimpJitterOptions
|
|
|
|
{
|
|
|
|
gboolean use_jitter;
|
|
|
|
gdouble jitter_amount;
|
|
|
|
};
|
2008-05-23 00:38:57 +08:00
|
|
|
|
2003-07-15 23:38:24 +08:00
|
|
|
struct _GimpFadeOptions
|
2002-02-22 00:02:30 +08:00
|
|
|
{
|
2009-12-07 02:03:39 +08:00
|
|
|
gboolean fade_reverse;
|
|
|
|
gdouble fade_length;
|
|
|
|
GimpUnit fade_unit;
|
|
|
|
GimpRepeatMode fade_repeat;
|
2003-07-15 23:38:24 +08:00
|
|
|
};
|
2003-02-08 01:12:21 +08:00
|
|
|
|
2003-07-15 23:38:24 +08:00
|
|
|
struct _GimpGradientOptions
|
|
|
|
{
|
2003-07-22 22:24:11 +08:00
|
|
|
gboolean gradient_reverse;
|
|
|
|
GimpRepeatMode gradient_repeat;
|
2002-02-22 00:02:30 +08:00
|
|
|
};
|
|
|
|
|
2010-10-22 20:47:36 +08:00
|
|
|
struct _GimpSmoothingOptions
|
|
|
|
{
|
|
|
|
gboolean use_smoothing;
|
2011-01-08 02:45:29 +08:00
|
|
|
gint smoothing_quality;
|
2010-10-22 20:47:36 +08:00
|
|
|
gdouble smoothing_factor;
|
|
|
|
};
|
|
|
|
|
2002-02-22 00:02:30 +08:00
|
|
|
|
2003-02-05 22:39:40 +08:00
|
|
|
#define GIMP_TYPE_PAINT_OPTIONS (gimp_paint_options_get_type ())
|
|
|
|
#define GIMP_PAINT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PAINT_OPTIONS, GimpPaintOptions))
|
|
|
|
#define GIMP_PAINT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PAINT_OPTIONS, GimpPaintOptionsClass))
|
|
|
|
#define GIMP_IS_PAINT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PAINT_OPTIONS))
|
|
|
|
#define GIMP_IS_PAINT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PAINT_OPTIONS))
|
|
|
|
#define GIMP_PAINT_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PAINT_OPTIONS, GimpPaintOptionsClass))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GimpPaintOptionsClass GimpPaintOptionsClass;
|
|
|
|
|
2002-02-22 00:02:30 +08:00
|
|
|
struct _GimpPaintOptions
|
|
|
|
{
|
2003-03-25 01:58:28 +08:00
|
|
|
GimpToolOptions parent_instance;
|
2002-02-22 00:02:30 +08:00
|
|
|
|
2004-08-31 21:20:57 +08:00
|
|
|
GimpPaintInfo *paint_info;
|
|
|
|
|
2013-05-22 00:52:40 +08:00
|
|
|
gboolean use_applicator;
|
|
|
|
|
2010-10-30 03:57:26 +08:00
|
|
|
gdouble brush_size;
|
2014-11-14 02:32:59 +08:00
|
|
|
gboolean brush_zoom;
|
2009-02-06 05:47:57 +08:00
|
|
|
gdouble brush_angle;
|
2009-04-26 01:53:09 +08:00
|
|
|
gdouble brush_aspect_ratio;
|
2014-11-13 07:29:04 +08:00
|
|
|
gdouble brush_spacing;
|
2014-11-17 19:07:55 +08:00
|
|
|
gdouble brush_hardness;
|
|
|
|
gdouble brush_force;
|
2006-11-16 23:11:27 +08:00
|
|
|
|
2015-01-06 07:30:35 +08:00
|
|
|
gboolean brush_link_size;
|
|
|
|
gboolean brush_link_aspect_ratio;
|
|
|
|
gboolean brush_link_angle;
|
|
|
|
gboolean brush_link_spacing;
|
|
|
|
gboolean brush_link_hardness;
|
|
|
|
|
2003-03-25 01:58:28 +08:00
|
|
|
GimpPaintApplicationMode application_mode;
|
|
|
|
GimpPaintApplicationMode application_mode_save;
|
2002-02-22 00:02:30 +08:00
|
|
|
|
2003-07-14 22:50:41 +08:00
|
|
|
gboolean hard;
|
|
|
|
|
2010-11-26 04:30:29 +08:00
|
|
|
GimpJitterOptions *jitter_options;
|
2010-11-25 05:34:00 +08:00
|
|
|
|
2010-11-26 04:30:29 +08:00
|
|
|
gboolean dynamics_expanded;
|
2003-07-15 23:38:24 +08:00
|
|
|
GimpFadeOptions *fade_options;
|
2008-04-25 18:52:01 +08:00
|
|
|
GimpGradientOptions *gradient_options;
|
2010-10-22 20:47:36 +08:00
|
|
|
GimpSmoothingOptions *smoothing_options;
|
2006-01-14 08:09:22 +08:00
|
|
|
|
|
|
|
GimpViewType brush_view_type;
|
|
|
|
GimpViewSize brush_view_size;
|
2010-10-28 02:48:17 +08:00
|
|
|
GimpViewType dynamics_view_type;
|
|
|
|
GimpViewSize dynamics_view_size;
|
2006-01-14 08:09:22 +08:00
|
|
|
GimpViewType pattern_view_type;
|
|
|
|
GimpViewSize pattern_view_size;
|
|
|
|
GimpViewType gradient_view_type;
|
|
|
|
GimpViewSize gradient_view_size;
|
2002-02-22 00:02:30 +08:00
|
|
|
};
|
|
|
|
|
2003-02-05 22:39:40 +08:00
|
|
|
struct _GimpPaintOptionsClass
|
|
|
|
{
|
|
|
|
GimpToolOptionsClass parent_instance;
|
|
|
|
};
|
2002-02-22 00:02:30 +08:00
|
|
|
|
|
|
|
|
2003-02-05 22:39:40 +08:00
|
|
|
GType gimp_paint_options_get_type (void) G_GNUC_CONST;
|
2002-02-22 00:02:30 +08:00
|
|
|
|
2004-08-31 21:20:57 +08:00
|
|
|
GimpPaintOptions * gimp_paint_options_new (GimpPaintInfo *paint_info);
|
2003-07-16 19:25:37 +08:00
|
|
|
|
|
|
|
gdouble gimp_paint_options_get_fade (GimpPaintOptions *paint_options,
|
2006-03-29 01:08:36 +08:00
|
|
|
GimpImage *image,
|
2003-07-16 19:25:37 +08:00
|
|
|
gdouble pixel_dist);
|
2002-02-22 00:02:30 +08:00
|
|
|
|
2008-04-25 18:52:01 +08:00
|
|
|
gdouble gimp_paint_options_get_jitter (GimpPaintOptions *paint_options,
|
|
|
|
GimpImage *image);
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
gboolean gimp_paint_options_get_gradient_color (GimpPaintOptions *paint_options,
|
2006-03-29 01:08:36 +08:00
|
|
|
GimpImage *image,
|
2008-05-10 18:03:21 +08:00
|
|
|
gdouble grad_point,
|
2003-07-22 22:24:11 +08:00
|
|
|
gdouble pixel_dist,
|
|
|
|
GimpRGB *color);
|
|
|
|
|
2003-07-14 22:50:41 +08:00
|
|
|
GimpBrushApplicationMode
|
2014-11-13 06:05:37 +08:00
|
|
|
gimp_paint_options_get_brush_mode (GimpPaintOptions *paint_options);
|
2003-07-14 22:50:41 +08:00
|
|
|
|
2014-11-13 06:05:37 +08:00
|
|
|
void gimp_paint_options_set_default_brush_size
|
|
|
|
(GimpPaintOptions *paint_options,
|
|
|
|
GimpBrush *brush);
|
|
|
|
|
|
|
|
void gimp_paint_options_set_default_brush_spacing
|
|
|
|
(GimpPaintOptions *paint_options,
|
2014-01-04 22:45:25 +08:00
|
|
|
GimpBrush *brush);
|
|
|
|
|
2014-11-17 19:07:55 +08:00
|
|
|
void gimp_paint_options_set_default_brush_hardness
|
|
|
|
(GimpPaintOptions *paint_options,
|
|
|
|
GimpBrush *brush);
|
|
|
|
|
2011-12-07 05:32:23 +08:00
|
|
|
void gimp_paint_options_copy_brush_props (GimpPaintOptions *src,
|
2011-06-03 02:16:54 +08:00
|
|
|
GimpPaintOptions *dest);
|
|
|
|
void gimp_paint_options_copy_dynamics_props (GimpPaintOptions *src,
|
|
|
|
GimpPaintOptions *dest);
|
2011-12-07 05:32:23 +08:00
|
|
|
void gimp_paint_options_copy_gradient_props (GimpPaintOptions *src,
|
|
|
|
GimpPaintOptions *dest);
|
2008-05-10 18:03:21 +08:00
|
|
|
|
2002-02-22 00:02:30 +08:00
|
|
|
|
|
|
|
#endif /* __GIMP_PAINT_OPTIONS_H__ */
|