1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3  *
4  * brush_generated module Copyright 1998 Jay Cox <jaycox@earthlink.net>
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __GIMP_BRUSH_GENERATED_H__
21 #define __GIMP_BRUSH_GENERATED_H__
22 
23 
24 #include "gimpbrush.h"
25 
26 
27 #define GIMP_TYPE_BRUSH_GENERATED            (gimp_brush_generated_get_type ())
28 #define GIMP_BRUSH_GENERATED(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BRUSH_GENERATED, GimpBrushGenerated))
29 #define GIMP_BRUSH_GENERATED_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_BRUSH_GENERATED, GimpBrushGeneratedClass))
30 #define GIMP_IS_BRUSH_GENERATED(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_BRUSH_GENERATED))
31 #define GIMP_IS_BRUSH_GENERATED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_BRUSH_GENERATED))
32 #define GIMP_BRUSH_GENERATED_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BRUSH_GENERATED, GimpBrushGeneratedClass))
33 
34 
35 typedef struct _GimpBrushGeneratedClass GimpBrushGeneratedClass;
36 
37 struct _GimpBrushGenerated
38 {
39   GimpBrush               parent_instance;
40 
41   GimpBrushGeneratedShape shape;
42   gfloat                  radius;
43   gint                    spikes;       /* 2 - 20     */
44   gfloat                  hardness;     /* 0.0 - 1.0  */
45   gfloat                  aspect_ratio; /* y/x        */
46   gfloat                  angle;        /* in degrees */
47 };
48 
49 struct _GimpBrushGeneratedClass
50 {
51   GimpBrushClass  parent_class;
52 };
53 
54 
55 GType       gimp_brush_generated_get_type     (void) G_GNUC_CONST;
56 
57 GimpData  * gimp_brush_generated_new          (const gchar             *name,
58                                                GimpBrushGeneratedShape  shape,
59                                                gfloat                   radius,
60                                                gint                     spikes,
61                                                gfloat                   hardness,
62                                                gfloat                   aspect_ratio,
63                                                gfloat                   angle);
64 
65 GimpBrushGeneratedShape
66         gimp_brush_generated_set_shape        (GimpBrushGenerated      *brush,
67                                                GimpBrushGeneratedShape  shape);
68 gfloat  gimp_brush_generated_set_radius       (GimpBrushGenerated      *brush,
69                                                gfloat                   radius);
70 gint    gimp_brush_generated_set_spikes       (GimpBrushGenerated      *brush,
71                                                gint                     spikes);
72 gfloat  gimp_brush_generated_set_hardness     (GimpBrushGenerated      *brush,
73                                                gfloat                   hardness);
74 gfloat  gimp_brush_generated_set_aspect_ratio (GimpBrushGenerated      *brush,
75                                                gfloat                   ratio);
76 gfloat  gimp_brush_generated_set_angle        (GimpBrushGenerated      *brush,
77                                                gfloat                   angle);
78 
79 GimpBrushGeneratedShape
80         gimp_brush_generated_get_shape        (GimpBrushGenerated      *brush);
81 gfloat  gimp_brush_generated_get_radius       (GimpBrushGenerated      *brush);
82 gint    gimp_brush_generated_get_spikes       (GimpBrushGenerated      *brush);
83 gfloat  gimp_brush_generated_get_hardness     (GimpBrushGenerated      *brush);
84 gfloat  gimp_brush_generated_get_aspect_ratio (GimpBrushGenerated      *brush);
85 gfloat  gimp_brush_generated_get_angle        (GimpBrushGenerated      *brush);
86 
87 
88 #endif  /*  __GIMP_BRUSH_GENERATED_H__  */
89