1999-08-26 09:00:27 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
* Copyright (C) 1999 Adrian Likins and Tor Lillqvist
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMPBRUSHPIPEP_H__
|
|
|
|
#define __GIMPBRUSHPIPEP_H__
|
|
|
|
|
Implement the selection of brush based on cursor direction, pressure,
1999-08-28 Tor Lillqvist <tml@iki.fi>
* app/gimpbrushpipe.c: Implement the selection of brush based on
cursor direction, pressure, tilt, or a random value. (Hmm, forgot
velocity, later.) (In addition to just incrementally stepping.)
Read the brush pipe parameters from the gih file's second line.
There is no way to tune the parameters in the GIMP, they must
currently be set when saving the gih file (in the gpb plug-in).
* app/gimpbrushpipe.h
* app/gimpbrushpipeP.h: Move the PipeSelectModes enum to the
"private" header. Add a stride array to GimpBrushPipe to make
indexing easier.
* plug-ins/common/gpb.c: Add selection mode fields to the dialog.
Attach the pipe parameters entered as a parasite, too.
* docs/parasites.txt
* plug-ins/common/psp.c: Use "placement", not "spacing" (which
means another thing).
1999-08-28 09:14:42 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
PIPE_SELECT_CONSTANT,
|
|
|
|
PIPE_SELECT_INCREMENTAL,
|
|
|
|
PIPE_SELECT_ANGULAR,
|
|
|
|
PIPE_SELECT_VELOCITY,
|
|
|
|
PIPE_SELECT_RANDOM,
|
|
|
|
PIPE_SELECT_PRESSURE,
|
|
|
|
PIPE_SELECT_TILT_X,
|
|
|
|
PIPE_SELECT_TILT_Y
|
|
|
|
} PipeSelectModes;
|
|
|
|
|
1999-08-26 09:00:27 +08:00
|
|
|
/* A GimpBrushPixmap always exists as part in one and only one GimpBrushPipe
|
|
|
|
* It contains a back-pointer to the GimpBrushPipe so that we can select
|
|
|
|
* the next brush in the pipe with just a reference to the GimpBrushPipe.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct _GimpBrushPixmap
|
|
|
|
{
|
2000-02-24 09:52:31 +08:00
|
|
|
GimpBrush gbrush;
|
2000-02-24 19:39:26 +08:00
|
|
|
|
2000-02-24 09:52:31 +08:00
|
|
|
TempBuf *pixmap_mask;
|
1999-08-26 09:00:27 +08:00
|
|
|
GimpBrushPipe *pipe;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpBrushPipe
|
|
|
|
{
|
2000-02-24 09:52:31 +08:00
|
|
|
GimpBrushPixmap pixmap; /* Also itself a pixmap brush */
|
|
|
|
|
|
|
|
GimpBrushPixmap *current; /* Currently selected brush */
|
|
|
|
gint dimension;
|
|
|
|
gint *rank; /* Size in each dimension */
|
|
|
|
gint *stride; /* Aux for indexing */
|
|
|
|
gint nbrushes; /* Might be less than the product of the
|
Implement the selection of brush based on cursor direction, pressure,
1999-08-28 Tor Lillqvist <tml@iki.fi>
* app/gimpbrushpipe.c: Implement the selection of brush based on
cursor direction, pressure, tilt, or a random value. (Hmm, forgot
velocity, later.) (In addition to just incrementally stepping.)
Read the brush pipe parameters from the gih file's second line.
There is no way to tune the parameters in the GIMP, they must
currently be set when saving the gih file (in the gpb plug-in).
* app/gimpbrushpipe.h
* app/gimpbrushpipeP.h: Move the PipeSelectModes enum to the
"private" header. Add a stride array to GimpBrushPipe to make
indexing easier.
* plug-ins/common/gpb.c: Add selection mode fields to the dialog.
Attach the pipe parameters entered as a parasite, too.
* docs/parasites.txt
* plug-ins/common/psp.c: Use "placement", not "spacing" (which
means another thing).
1999-08-28 09:14:42 +08:00
|
|
|
* ranks in some odd special case
|
|
|
|
*/
|
1999-08-26 09:00:27 +08:00
|
|
|
GimpBrushPixmap **brushes;
|
2000-02-24 09:52:31 +08:00
|
|
|
PipeSelectModes *select; /* One mode per dimension */
|
|
|
|
gint *index; /* Current index for incremental dimensions */
|
1999-08-26 09:00:27 +08:00
|
|
|
};
|
|
|
|
|
2000-02-24 19:39:26 +08:00
|
|
|
typedef struct _GimpBrushPixmapClass GimpBrushPixmapClass;
|
|
|
|
|
|
|
|
struct _GimpBrushPixmapClass
|
1999-08-26 09:00:27 +08:00
|
|
|
{
|
|
|
|
GimpBrushClass parent_class;
|
2000-02-24 19:39:26 +08:00
|
|
|
};
|
1999-08-26 09:00:27 +08:00
|
|
|
|
2000-02-24 19:39:26 +08:00
|
|
|
typedef struct _GimpBrushPipeClass GimpBrushPipeClass;
|
|
|
|
|
|
|
|
struct _GimpBrushPipeClass
|
1999-08-26 09:00:27 +08:00
|
|
|
{
|
|
|
|
GimpBrushPixmapClass parent_class;
|
2000-02-24 19:39:26 +08:00
|
|
|
};
|
1999-08-26 09:00:27 +08:00
|
|
|
|
|
|
|
#endif /* __GIMPBRUSHPIPEP_H__ */
|