2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2001-02-27 13:21:12 +08:00
|
|
|
* Copyright (C) 1995 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
|
2001-02-27 13:21:12 +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
|
2001-02-27 13:21:12 +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
|
2018-07-12 05:27:07 +08:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2001-02-27 13:21:12 +08:00
|
|
|
*/
|
|
|
|
|
2002-02-15 03:31:16 +08:00
|
|
|
#ifndef __GIMP_PAINTBRUSH_H__
|
|
|
|
#define __GIMP_PAINTBRUSH_H__
|
2001-02-27 13:21:12 +08:00
|
|
|
|
2001-02-28 03:18:01 +08:00
|
|
|
|
2004-05-26 04:41:09 +08:00
|
|
|
#include "gimpbrushcore.h"
|
2001-02-27 13:21:12 +08:00
|
|
|
|
2001-02-28 03:18:01 +08:00
|
|
|
|
2002-02-15 03:31:16 +08:00
|
|
|
#define GIMP_TYPE_PAINTBRUSH (gimp_paintbrush_get_type ())
|
|
|
|
#define GIMP_PAINTBRUSH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PAINTBRUSH, GimpPaintbrush))
|
|
|
|
#define GIMP_PAINTBRUSH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PAINTBRUSH, GimpPaintbrushClass))
|
|
|
|
#define GIMP_IS_PAINTBRUSH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PAINTBRUSH))
|
|
|
|
#define GIMP_IS_PAINTBRUSH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PAINTBRUSH))
|
|
|
|
#define GIMP_PAINTBRUSH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PAINTBRUSH, GimpPaintbrushClass))
|
2001-02-27 13:21:12 +08:00
|
|
|
|
2001-02-28 03:18:01 +08:00
|
|
|
|
2002-02-15 03:31:16 +08:00
|
|
|
typedef struct _GimpPaintbrushClass GimpPaintbrushClass;
|
2001-02-28 03:18:01 +08:00
|
|
|
|
2002-02-15 03:31:16 +08:00
|
|
|
struct _GimpPaintbrush
|
2001-02-27 13:21:12 +08:00
|
|
|
{
|
2019-05-16 01:32:31 +08:00
|
|
|
GimpBrushCore parent_instance;
|
2019-05-15 22:01:01 +08:00
|
|
|
|
|
|
|
GeglBuffer *paint_buffer;
|
|
|
|
const GimpTempBuf *paint_pixmap;
|
2023-12-22 13:50:57 +08:00
|
|
|
GeglColor *paint_color;
|
2001-02-27 13:21:12 +08:00
|
|
|
};
|
|
|
|
|
2002-02-15 03:31:16 +08:00
|
|
|
struct _GimpPaintbrushClass
|
2001-02-27 13:21:12 +08:00
|
|
|
{
|
2007-02-09 06:58:22 +08:00
|
|
|
GimpBrushCoreClass parent_class;
|
2019-05-27 02:38:24 +08:00
|
|
|
|
|
|
|
/* virtual functions */
|
2019-05-29 16:25:38 +08:00
|
|
|
gboolean (* get_color_history_color) (GimpPaintbrush *paintbrush,
|
|
|
|
GimpDrawable *drawable,
|
|
|
|
GimpPaintOptions *paint_options,
|
2023-12-11 23:34:24 +08:00
|
|
|
GeglColor **color);
|
2019-05-29 16:25:38 +08:00
|
|
|
void (* get_paint_params) (GimpPaintbrush *paintbrush,
|
|
|
|
GimpDrawable *drawable,
|
|
|
|
GimpPaintOptions *paint_options,
|
|
|
|
GimpSymmetry *sym,
|
2019-08-03 03:25:00 +08:00
|
|
|
gdouble grad_point,
|
2019-05-29 16:25:38 +08:00
|
|
|
GimpLayerMode *paint_mode,
|
|
|
|
GimpPaintApplicationMode *paint_appl_mode,
|
|
|
|
const GimpTempBuf **paint_pixmap,
|
2023-12-22 13:50:57 +08:00
|
|
|
GeglColor **paint_color);
|
2001-02-27 13:21:12 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-02-27 21:57:49 +08:00
|
|
|
void gimp_paintbrush_register (Gimp *gimp,
|
|
|
|
GimpPaintRegisterCallback callback);
|
|
|
|
|
2002-02-15 03:31:16 +08:00
|
|
|
GType gimp_paintbrush_get_type (void) G_GNUC_CONST;
|
2001-11-21 07:00:47 +08:00
|
|
|
|
2001-02-28 03:18:01 +08:00
|
|
|
|
2003-07-15 23:38:24 +08:00
|
|
|
/* protected */
|
|
|
|
|
|
|
|
void _gimp_paintbrush_motion (GimpPaintCore *paint_core,
|
|
|
|
GimpDrawable *drawable,
|
|
|
|
GimpPaintOptions *paint_options,
|
2016-01-28 02:13:17 +08:00
|
|
|
GimpSymmetry *sym,
|
2003-07-15 23:38:24 +08:00
|
|
|
gdouble opacity);
|
|
|
|
|
|
|
|
|
2002-02-15 03:31:16 +08:00
|
|
|
#endif /* __GIMP_PAINTBRUSH_H__ */
|