~ubuntu-branches/ubuntu/maverick/gimp/maverick-updates

« back to all changes in this revision

Viewing changes to plug-ins/gimpressionist/gimpressionist.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-09 19:44:52 UTC
  • Revision ID: james.westby@ubuntu.com-20051209194452-yggpemjlofpjqyf4
Tags: upstream-2.2.9
ImportĀ upstreamĀ versionĀ 2.2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef __GIMPRESSIONIST_H
 
3
#define __GIMPRESSIONIST_H
 
4
 
 
5
/* Includes necessary for the correct processing of this file. */
 
6
#include <libgimp/gimp.h>
 
7
#include <libgimp/gimpui.h>
 
8
 
 
9
#include "ppmtool.h"
 
10
/* Defines */
 
11
 
 
12
#define PLUG_IN_NAME    "plug_in_gimpressionist"
 
13
#define PLUG_IN_VERSION "v1.0, November 2003"
 
14
#define HELP_ID         "plug-in-gimppressionist"
 
15
 
 
16
#define PREVIEWSIZE     150
 
17
#define MAXORIENTVECT   50
 
18
#define MAXSIZEVECT     50
 
19
 
 
20
/* Type declaration and definitions */
 
21
 
 
22
typedef struct vector
 
23
{
 
24
  double x, y;
 
25
  double dir;
 
26
  double dx, dy;
 
27
  double str;
 
28
  int    type;
 
29
} vector_t;
 
30
 
 
31
typedef struct smvector
 
32
{
 
33
  double x, y;
 
34
  double siz;
 
35
  double str;
 
36
} smvector_t;
 
37
 
 
38
typedef struct
 
39
{
 
40
  int        orient_num;
 
41
  double     orient_first;
 
42
  double     orient_last;
 
43
  int        orient_type;
 
44
  double     brush_relief;
 
45
  double     brush_scale;
 
46
  double     brush_density;
 
47
  double     brushgamma;
 
48
  int        general_background_type;
 
49
  double     general_dark_edge;
 
50
  double     paper_relief;
 
51
  double     paper_scale;
 
52
  int        paper_invert;
 
53
  int        run;
 
54
  char       selected_brush[200];
 
55
  char       selected_paper[200];
 
56
  GimpRGB    color;
 
57
  int        general_paint_edges;
 
58
  int        place_type;
 
59
  vector_t   orient_vectors[MAXORIENTVECT];
 
60
  int        num_orient_vectors;
 
61
  int        placement_center;
 
62
  double     brush_aspect;
 
63
  double     orient_angle_offset;
 
64
  double     orient_strength_exponent;
 
65
  int        general_tileable;
 
66
  int        paper_overlay;
 
67
  int        orient_voronoi;
 
68
  int        color_brushes;
 
69
  int        general_drop_shadow;
 
70
  double     general_shadow_darkness;
 
71
  int        size_num;
 
72
  double     size_first;
 
73
  double     size_last;
 
74
  int        size_type;
 
75
  double     devthresh;
 
76
 
 
77
  smvector_t size_vectors[MAXSIZEVECT];
 
78
  int        num_size_vectors;
 
79
  double     size_strength_exponent;
 
80
  int        size_voronoi;
 
81
 
 
82
  int        general_shadow_depth;
 
83
  int        general_shadow_blur;
 
84
 
 
85
  int        color_type;
 
86
  double     color_noise;
 
87
} gimpressionist_vals_t;
 
88
 
 
89
/* Enumerations */
 
90
 
 
91
enum GENERAL_BG_TYPE_ENUM
 
92
{
 
93
    BG_TYPE_SOLID = 0,
 
94
    BG_TYPE_KEEP_ORIGINAL = 1,
 
95
    BG_TYPE_FROM_PAPER = 2,
 
96
    BG_TYPE_TRANSPARENT = 3,
 
97
};
 
98
 
 
99
enum PRESETS_LIST_COLUMN_ENUM
 
100
{
 
101
  PRESETS_LIST_COLUMN_FILENAME = 0,
 
102
  PRESETS_LIST_COLUMN_OBJECT_NAME = 1,
 
103
};
 
104
 
 
105
/* Globals */
 
106
 
 
107
extern gimpressionist_vals_t pcvals;
 
108
 
 
109
 
 
110
/* Prototypes */
 
111
 
 
112
GList *parsepath (void);
 
113
void free_parsepath_cache (void);
 
114
 
 
115
void grabarea (void);
 
116
void store_values (void);
 
117
void restore_values (void);
 
118
gchar *findfile (const gchar *);
 
119
 
 
120
void unselectall (GtkWidget *list);
 
121
void reselect (GtkWidget *list, char *fname);
 
122
void readdirintolist (char *subdir, GtkWidget *view, char *selected);
 
123
void readdirintolist_extended (char *subdir, GtkWidget *view, char *selected,
 
124
                               gboolean with_filename_column,
 
125
                               gchar *(*get_object_name_cb)
 
126
                               (gchar *dir, gchar *filename, void *context),
 
127
                               void * context);
 
128
 
 
129
GtkWidget *create_one_column_list (GtkWidget *parent,
 
130
                                   void (*changed_cb)
 
131
                                   (GtkTreeSelection *selection, 
 
132
                                    gpointer data));
 
133
 
 
134
void brush_reload (const gchar *fn, struct ppm *p);
 
135
 
 
136
double get_direction (double x, double y, int from);
 
137
 
 
138
void create_sizemap_dialog (void);
 
139
double getsiz_proto (double x, double y, int n, smvector_t *vec,
 
140
                     double smstrexp, int voronoi);
 
141
 
 
142
 
 
143
void set_colorbrushes (const gchar *fn);
 
144
int  create_gimpressionist (void);
 
145
 
 
146
double dist (double x, double y, double dx, double dy);
 
147
 
 
148
void restore_default_values (void);
 
149
 
 
150
GtkWidget *create_radio_button (GtkWidget *box, int orient_type,
 
151
                                void (*callback)(GtkWidget *wg, void *d),
 
152
                                gchar *label, gchar *help_string,
 
153
                                GSList **radio_group,
 
154
                                GtkWidget **buttons_array
 
155
                               );
 
156
 
 
157
#define CLAMP_UP_TO(x, max) (CLAMP((x),(0),(max-1)))
 
158
 
 
159
#endif /* #ifndef __GIMPRESSIONIST_H */
 
160
 
 
161