2002-11-19 20:25:57 +00:00
|
|
|
|
2004-01-20 17:10:16 +00:00
|
|
|
#define PLUG_IN_NAME "plug_in_gimpressionist"
|
2003-10-24 20:57:29 +00:00
|
|
|
#define PLUG_IN_VERSION "v1.0, November 2003"
|
2004-01-20 17:10:16 +00:00
|
|
|
#define HELP_ID "plug-in-gimppressionist"
|
1999-08-26 22:29:37 +00:00
|
|
|
|
|
|
|
#ifndef DEFAULTPATH
|
|
|
|
#define DEFAULTPATH "~/.gimp/gimpressionist:/usr/local/share/gimp/gimpressionist"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define PREVIEWSIZE 150
|
|
|
|
#define MAXORIENTVECT 50
|
|
|
|
#define MAXSIZEVECT 50
|
|
|
|
|
|
|
|
/* Type declaration and definitions */
|
|
|
|
|
2002-11-19 20:25:57 +00:00
|
|
|
typedef struct vector {
|
1999-08-26 22:29:37 +00:00
|
|
|
double x, y;
|
|
|
|
double dir;
|
|
|
|
double dx, dy;
|
|
|
|
double str;
|
|
|
|
int type;
|
2002-11-19 20:25:57 +00:00
|
|
|
} vector_t;
|
1999-08-26 22:29:37 +00:00
|
|
|
|
2002-11-19 20:25:57 +00:00
|
|
|
typedef struct smvector {
|
1999-08-26 22:29:37 +00:00
|
|
|
double x, y;
|
|
|
|
double siz;
|
|
|
|
double str;
|
2002-11-19 20:25:57 +00:00
|
|
|
} smvector_t;
|
1999-08-26 22:29:37 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int orientnum;
|
|
|
|
double orientfirst;
|
|
|
|
double orientlast;
|
|
|
|
int orienttype;
|
|
|
|
double brushrelief;
|
|
|
|
double brushscale;
|
|
|
|
double brushdensity;
|
|
|
|
double brushgamma;
|
|
|
|
int generalbgtype;
|
|
|
|
double generaldarkedge;
|
|
|
|
double paperrelief;
|
|
|
|
double paperscale;
|
|
|
|
int paperinvert;
|
|
|
|
int run;
|
|
|
|
char selectedbrush[100];
|
|
|
|
char selectedpaper[100];
|
2002-11-19 20:25:57 +00:00
|
|
|
GimpRGB color;
|
1999-08-26 22:29:37 +00:00
|
|
|
int generalpaintedges;
|
|
|
|
int placetype;
|
2002-11-19 20:25:57 +00:00
|
|
|
vector_t orientvector[MAXORIENTVECT];
|
1999-08-26 22:29:37 +00:00
|
|
|
int numorientvector;
|
|
|
|
int placecenter;
|
|
|
|
double brushaspect;
|
|
|
|
double orientangoff;
|
|
|
|
double orientstrexp;
|
|
|
|
int generaltileable;
|
|
|
|
int paperoverlay;
|
|
|
|
int orientvoronoi;
|
|
|
|
int colorbrushes;
|
|
|
|
int generaldropshadow;
|
|
|
|
double generalshadowdarkness;
|
|
|
|
int sizenum;
|
|
|
|
double sizefirst;
|
|
|
|
double sizelast;
|
|
|
|
int sizetype;
|
|
|
|
double devthresh;
|
|
|
|
|
2002-11-19 20:25:57 +00:00
|
|
|
smvector_t sizevector[MAXSIZEVECT];
|
1999-08-26 22:29:37 +00:00
|
|
|
int numsizevector;
|
|
|
|
double sizestrexp;
|
|
|
|
int sizevoronoi;
|
|
|
|
|
|
|
|
int generalshadowdepth;
|
|
|
|
int generalshadowblur;
|
1999-08-29 21:06:26 +00:00
|
|
|
|
1999-09-09 20:28:34 +00:00
|
|
|
int colortype;
|
|
|
|
double colornoise;
|
1999-08-26 22:29:37 +00:00
|
|
|
} gimpressionist_vals_t;
|
|
|
|
|
|
|
|
/* Globals */
|
|
|
|
|
|
|
|
extern char *standalone;
|
|
|
|
|
|
|
|
extern gimpressionist_vals_t pcvals;
|
|
|
|
extern gimpressionist_vals_t defaultpcvals;
|
|
|
|
extern char *path;
|
|
|
|
extern struct ppm infile;
|
|
|
|
extern struct ppm inalpha;
|
|
|
|
extern GtkWidget *window;
|
|
|
|
|
|
|
|
extern int brushfile;
|
|
|
|
extern struct ppm brushppm;
|
|
|
|
|
|
|
|
extern GtkWidget *brushlist;
|
|
|
|
extern GtkObject *brushscaleadjust;
|
|
|
|
extern GtkObject *brushaspectadjust;
|
|
|
|
extern GtkObject *brushreliefadjust;
|
|
|
|
extern GtkObject *brushdensityadjust;
|
|
|
|
extern GtkObject *brushgammaadjust;
|
|
|
|
|
|
|
|
extern GtkWidget *paperlist;
|
|
|
|
extern GtkObject *paperscaleadjust;
|
|
|
|
extern GtkObject *paperreliefadjust;
|
|
|
|
extern GtkWidget *paperinvert;
|
|
|
|
extern GtkWidget *paperoverlay;
|
|
|
|
|
|
|
|
extern GtkObject *orientnumadjust;
|
|
|
|
extern GtkObject *orientfirstadjust;
|
|
|
|
extern GtkObject *orientlastadjust;
|
|
|
|
extern int orientationtype;
|
|
|
|
extern GtkWidget *orientradio[];
|
|
|
|
|
|
|
|
extern GtkWidget *sizeradio[];
|
|
|
|
|
|
|
|
extern GtkObject *sizenumadjust;
|
|
|
|
extern GtkObject *sizefirstadjust;
|
|
|
|
extern GtkObject *sizelastadjust;
|
|
|
|
|
|
|
|
extern GtkObject *generaldarkedgeadjust;
|
|
|
|
extern int generalbgtype;
|
|
|
|
extern GtkWidget *generalpaintedges;
|
|
|
|
extern GtkWidget *generaltileable;
|
|
|
|
extern GtkWidget *generaldropshadow;
|
2002-11-19 20:25:57 +00:00
|
|
|
extern GtkWidget *generalcolbutton;
|
1999-08-26 22:29:37 +00:00
|
|
|
extern GtkObject *generalshadowadjust;
|
|
|
|
extern GtkObject *generalshadowdepth;
|
|
|
|
extern GtkObject *generalshadowblur;
|
|
|
|
extern GtkObject *devthreshadjust;
|
1999-09-09 20:28:34 +00:00
|
|
|
|
|
|
|
extern GtkWidget *colortype;
|
|
|
|
extern GtkObject *colornoiseadjust;
|
1999-08-26 22:29:37 +00:00
|
|
|
|
|
|
|
extern GtkWidget *placecenter;
|
|
|
|
|
|
|
|
extern GtkWidget *previewbutton;
|
|
|
|
|
|
|
|
extern GtkWidget *presetsavebutton;
|
|
|
|
|
2002-11-19 20:25:57 +00:00
|
|
|
extern gboolean img_has_alpha;
|
1999-08-26 22:29:37 +00:00
|
|
|
|
configure.in app/core/gimpbrushpipe.c app/gui/about-dialog.c
2002-11-20 Dave Neary <bolsh@gimp.org>
* configure.in
* app/core/gimpbrushpipe.c
* app/gui/about-dialog.c
* app/paint-funcs/paint-funcs-generic.h
* app/paint-funcs/paint-funcs.c
* libgimpmath/gimpmath.h
* libgimpwidgets/gimpwidgets.c
* plug-ins/common/CML_explorer.c
* plug-ins/common/blur.c
* plug-ins/common/cubism.c
* plug-ins/common/gee.c
* plug-ins/common/gee_zoom.c
* plug-ins/common/gqbist.c
* plug-ins/common/jigsaw.c
* plug-ins/common/lic.c
* plug-ins/common/noisify.c
* plug-ins/common/nova.c
* plug-ins/common/papertile.c
* plug-ins/common/plasma.c
* plug-ins/common/randomize.c
* plug-ins/common/sample_colorize.c
* plug-ins/common/scatter_hsv.c
* plug-ins/common/shift.c
* plug-ins/common/sinus.c
* plug-ins/common/smooth_palette.c
* plug-ins/common/snoise.c
* plug-ins/common/sparkle.c
* plug-ins/common/spheredesigner.c
* plug-ins/common/spread.c
* plug-ins/common/warp.c
* plug-ins/common/wind.c
* plug-ins/flame/cmap.c
* plug-ins/flame/flame.c
* plug-ins/flame/libifs.c
* plug-ins/gflare/gflare.c
* plug-ins/gimpressionist/gimpressionist.c
* plug-ins/gimpressionist/gimpressionist.h
* plug-ins/gimpressionist/plasma.c
* plug-ins/gimpressionist/repaint.c
* plug-ins/ifscompose/ifscompose_utils.c
* plug-ins/maze/algorithms.c
* plug-ins/maze/maze.c
* plug-ins/maze/maze.h
* plug-ins/mosaic/mosaic.c: Change all occurrences of RAND_MAX,
G_MAXRAND, rand(), srand(), lrand48(), srand48(), random(),
srandom(), RAND_FUNC and SRAND_FUNC to the appropriate g_rand*
equivalent. Programs which require seed setting for reproducible
results, and anything in the core, gets a dedicated GRand * for
the lifetime required. Programs which only ever used random
numbers for tossing a coin, rolling a dice, etc use g_random
functions. For the rest, judgement was used. Where it was easy, a
GRand * object was used and g_rand_* functions were
preferred. This fixes bug #67386 in HEAD.
2002-11-20 09:27:48 +00:00
|
|
|
extern GRand *gr;
|
|
|
|
|
1999-08-26 22:29:37 +00:00
|
|
|
/* Prototypes */
|
|
|
|
|
|
|
|
GList *parsepath(void);
|
|
|
|
|
|
|
|
void create_paperpage(GtkNotebook *);
|
|
|
|
void create_brushpage(GtkNotebook *);
|
|
|
|
void create_orientationpage(GtkNotebook *);
|
|
|
|
void create_sizepage(GtkNotebook *);
|
|
|
|
void create_generalpage(GtkNotebook *);
|
|
|
|
void create_presetpage(GtkNotebook *);
|
|
|
|
void create_placementpage(GtkNotebook *);
|
1999-09-09 20:28:34 +00:00
|
|
|
void create_colorpage(GtkNotebook *);
|
1999-08-26 22:29:37 +00:00
|
|
|
|
|
|
|
GtkWidget* create_preview();
|
2002-11-19 20:25:57 +00:00
|
|
|
void updatepreviewprev(GtkWidget *wg, gpointer d);
|
1999-08-26 22:29:37 +00:00
|
|
|
|
|
|
|
void grabarea(void);
|
|
|
|
void storevals(void);
|
|
|
|
void restorevals(void);
|
2002-02-18 14:34:50 +00:00
|
|
|
gchar *findfile(const gchar *);
|
1999-08-26 22:29:37 +00:00
|
|
|
|
|
|
|
void unselectall(GtkWidget *list);
|
|
|
|
void reselect(GtkWidget *list, char *fname);
|
2002-12-17 20:18:16 +00:00
|
|
|
void readdirintolist(char *subdir, GtkWidget *view, char *selected);
|
1999-08-26 22:29:37 +00:00
|
|
|
void orientchange(GtkWidget *wg, void *d, int num);
|
|
|
|
void sizechange(GtkWidget *wg, void *d, int num);
|
2002-12-12 20:11:24 +00:00
|
|
|
void placechange(int num);
|
|
|
|
void colorchange(int num);
|
1999-08-26 22:29:37 +00:00
|
|
|
void generalbgchange(GtkWidget *wg, void *d, int num);
|
|
|
|
|
2002-12-17 20:18:16 +00:00
|
|
|
GtkWidget *createonecolumnlist(GtkWidget *parent,
|
|
|
|
void (*changed_cb)
|
|
|
|
(GtkTreeSelection *selection, gpointer data));
|
|
|
|
|
1999-08-26 22:29:37 +00:00
|
|
|
void reloadbrush(char *fn, struct ppm *p);
|
|
|
|
|
|
|
|
void create_orientmap_dialog(void);
|
|
|
|
void update_orientmap_dialog(void);
|
|
|
|
int pixval(double dir);
|
|
|
|
double getdir(double x, double y, int from);
|
|
|
|
|
|
|
|
void create_sizemap_dialog(void);
|
|
|
|
double getsiz(double x, double y, int from);
|