home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / gimpbrushpipe.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-20  |  2.4 KB  |  86 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  * Copyright (C) 1999 Adrian Likins and Tor Lillqvist
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2 of the License, or
  8.  * (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18.  */
  19.  
  20. #ifndef __GIMP_BRUSH_PIPE_H__
  21. #define __GIMP_BRUSH_PIPE_H__
  22.  
  23.  
  24. #include "tools.h"
  25. #include "paint_core.h"
  26. #include "gimpbrush.h"
  27. #include "temp_buf.h"
  28.  
  29.  
  30. typedef struct _GimpBrushPipe GimpBrushPipe;
  31.  
  32.  
  33. #define GIMP_TYPE_BRUSH_PIPE    (gimp_brush_pipe_get_type ())
  34. #define GIMP_BRUSH_PIPE(obj)    (GTK_CHECK_CAST ((obj), GIMP_TYPE_BRUSH_PIPE, GimpBrushPipe))
  35. #define GIMP_IS_BRUSH_PIPE(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH_PIPE))
  36.  
  37.  
  38. typedef enum
  39. {
  40.   PIPE_SELECT_CONSTANT,
  41.   PIPE_SELECT_INCREMENTAL,
  42.   PIPE_SELECT_ANGULAR,
  43.   PIPE_SELECT_VELOCITY,
  44.   PIPE_SELECT_RANDOM,
  45.   PIPE_SELECT_PRESSURE,
  46.   PIPE_SELECT_TILT_X,
  47.   PIPE_SELECT_TILT_Y
  48. } PipeSelectModes;
  49.  
  50.  
  51. struct _GimpBrushPipe
  52. {
  53.   GimpBrush         gbrush;     /* Also itself a brush */
  54.  
  55.   gint              dimension;
  56.   gint             *rank;    /* Size in each dimension */
  57.   gint             *stride;    /* Aux for indexing */
  58.   PipeSelectModes  *select;    /* One mode per dimension */
  59.  
  60.   gint             *index;    /* Current index for incremental dimensions */
  61.  
  62.   gint              nbrushes;    /* Might be less than the product of the
  63.                  * ranks in some odd special case */
  64.   GimpBrush       **brushes;
  65.   GimpBrush        *current;    /* Currently selected brush */
  66. };
  67.  
  68. typedef struct _GimpBrushPipeClass GimpBrushPipeClass;
  69.  
  70. struct _GimpBrushPipeClass
  71. {
  72.   GimpBrushClass  parent_class;
  73. };
  74.  
  75.  
  76. GtkType     gimp_brush_pixmap_get_type (void);
  77. GtkType     gimp_brush_pipe_get_type   (void);
  78.  
  79. GimpBrush * gimp_brush_pipe_load       (gchar *filename);
  80.  
  81.  
  82. #endif  /* __GIMP_BRUSH_PIPE_H__ */
  83.  
  84.  
  85.  
  86.