mirror of https://github.com/GNOME/gimp.git
moved all global variables into the GimpPaintTool structure so they have a
2002-02-13 Michael Natterer <mitch@gimp.org> * app/tools/gimppainttool.[ch]: moved all global variables into the GimpPaintTool structure so they have a proper lifecycle and it's easier to move them to the upcoming GimpPaintCore (??) object. * app/tools/gimppainttool_kernels.h * tools/kernelgen.c: s/SUBSAMPLE/KERNEL_SUBSAMPLE/
This commit is contained in:
parent
1e9c264a3a
commit
dac875d3f2
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2002-02-13 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/tools/gimppainttool.[ch]: moved all global variables into
|
||||||
|
the GimpPaintTool structure so they have a proper lifecycle and
|
||||||
|
it's easier to move them to the upcoming GimpPaintCore (??)
|
||||||
|
object.
|
||||||
|
|
||||||
|
* app/tools/gimppainttool_kernels.h
|
||||||
|
* tools/kernelgen.c: s/SUBSAMPLE/KERNEL_SUBSAMPLE/
|
||||||
|
|
||||||
2002-02-13 Michael Natterer <mitch@gimp.org>
|
2002-02-13 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/gui/menus.c: moved "Merge Layers" and "Flatten Image" from
|
* app/gui/menus.c: moved "Merge Layers" and "Flatten Image" from
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,9 @@
|
||||||
#include "gimpdrawtool.h"
|
#include "gimpdrawtool.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define PAINT_TOOL_SUBSAMPLE 4
|
||||||
|
|
||||||
|
|
||||||
/* the different states that the painting function can be called with */
|
/* the different states that the painting function can be called with */
|
||||||
|
|
||||||
typedef enum /*< pdb-skip >*/
|
typedef enum /*< pdb-skip >*/
|
||||||
|
@ -83,6 +86,27 @@ struct _GimpPaintTool
|
||||||
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
|
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
|
||||||
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
|
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
|
||||||
ToolFlags flags; /* tool flags, see ToolFlags above */
|
ToolFlags flags; /* tool flags, see ToolFlags above */
|
||||||
|
|
||||||
|
/* undo blocks variables */
|
||||||
|
TileManager *undo_tiles;
|
||||||
|
TileManager *canvas_tiles;
|
||||||
|
|
||||||
|
/* paint buffers variables */
|
||||||
|
TempBuf *orig_buf;
|
||||||
|
TempBuf *canvas_buf;
|
||||||
|
|
||||||
|
/* brush buffers */
|
||||||
|
MaskBuf *pressure_brush;
|
||||||
|
MaskBuf *solid_brush;
|
||||||
|
MaskBuf *scale_brush;
|
||||||
|
MaskBuf *scale_pixmap;
|
||||||
|
MaskBuf *kernel_brushes[PAINT_TOOL_SUBSAMPLE + 1][PAINT_TOOL_SUBSAMPLE + 1];
|
||||||
|
|
||||||
|
MaskBuf *last_brush_mask;
|
||||||
|
gboolean cache_invalid;
|
||||||
|
|
||||||
|
/* don't use this one... */
|
||||||
|
GimpBrush *grr_brush;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpPaintToolClass
|
struct _GimpPaintToolClass
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,9 @@
|
||||||
#include "gimpdrawtool.h"
|
#include "gimpdrawtool.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define PAINT_TOOL_SUBSAMPLE 4
|
||||||
|
|
||||||
|
|
||||||
/* the different states that the painting function can be called with */
|
/* the different states that the painting function can be called with */
|
||||||
|
|
||||||
typedef enum /*< pdb-skip >*/
|
typedef enum /*< pdb-skip >*/
|
||||||
|
@ -83,6 +86,27 @@ struct _GimpPaintTool
|
||||||
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
|
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
|
||||||
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
|
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
|
||||||
ToolFlags flags; /* tool flags, see ToolFlags above */
|
ToolFlags flags; /* tool flags, see ToolFlags above */
|
||||||
|
|
||||||
|
/* undo blocks variables */
|
||||||
|
TileManager *undo_tiles;
|
||||||
|
TileManager *canvas_tiles;
|
||||||
|
|
||||||
|
/* paint buffers variables */
|
||||||
|
TempBuf *orig_buf;
|
||||||
|
TempBuf *canvas_buf;
|
||||||
|
|
||||||
|
/* brush buffers */
|
||||||
|
MaskBuf *pressure_brush;
|
||||||
|
MaskBuf *solid_brush;
|
||||||
|
MaskBuf *scale_brush;
|
||||||
|
MaskBuf *scale_pixmap;
|
||||||
|
MaskBuf *kernel_brushes[PAINT_TOOL_SUBSAMPLE + 1][PAINT_TOOL_SUBSAMPLE + 1];
|
||||||
|
|
||||||
|
MaskBuf *last_brush_mask;
|
||||||
|
gboolean cache_invalid;
|
||||||
|
|
||||||
|
/* don't use this one... */
|
||||||
|
GimpBrush *grr_brush;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpPaintToolClass
|
struct _GimpPaintToolClass
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,9 @@
|
||||||
#include "gimpdrawtool.h"
|
#include "gimpdrawtool.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define PAINT_TOOL_SUBSAMPLE 4
|
||||||
|
|
||||||
|
|
||||||
/* the different states that the painting function can be called with */
|
/* the different states that the painting function can be called with */
|
||||||
|
|
||||||
typedef enum /*< pdb-skip >*/
|
typedef enum /*< pdb-skip >*/
|
||||||
|
@ -83,6 +86,27 @@ struct _GimpPaintTool
|
||||||
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
|
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
|
||||||
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
|
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
|
||||||
ToolFlags flags; /* tool flags, see ToolFlags above */
|
ToolFlags flags; /* tool flags, see ToolFlags above */
|
||||||
|
|
||||||
|
/* undo blocks variables */
|
||||||
|
TileManager *undo_tiles;
|
||||||
|
TileManager *canvas_tiles;
|
||||||
|
|
||||||
|
/* paint buffers variables */
|
||||||
|
TempBuf *orig_buf;
|
||||||
|
TempBuf *canvas_buf;
|
||||||
|
|
||||||
|
/* brush buffers */
|
||||||
|
MaskBuf *pressure_brush;
|
||||||
|
MaskBuf *solid_brush;
|
||||||
|
MaskBuf *scale_brush;
|
||||||
|
MaskBuf *scale_pixmap;
|
||||||
|
MaskBuf *kernel_brushes[PAINT_TOOL_SUBSAMPLE + 1][PAINT_TOOL_SUBSAMPLE + 1];
|
||||||
|
|
||||||
|
MaskBuf *last_brush_mask;
|
||||||
|
gboolean cache_invalid;
|
||||||
|
|
||||||
|
/* don't use this one... */
|
||||||
|
GimpBrush *grr_brush;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpPaintToolClass
|
struct _GimpPaintToolClass
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
* (threshold = 0.25)
|
* (threshold = 0.25)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define KERNEL_WIDTH 3
|
#define KERNEL_WIDTH 3
|
||||||
#define KERNEL_HEIGHT 3
|
#define KERNEL_HEIGHT 3
|
||||||
#define SUBSAMPLE 4
|
#define KERNEL_SUBSAMPLE 4
|
||||||
|
|
||||||
|
|
||||||
/* Brush pixel subsampling kernels */
|
/* Brush pixel subsampling kernels */
|
||||||
|
|
|
@ -89,9 +89,9 @@ main (int argc,
|
||||||
" * This file was generated using kernelgen as found in the tools dir.\n");
|
" * This file was generated using kernelgen as found in the tools dir.\n");
|
||||||
printf (" * (threshold = %g)\n", THRESHOLD);
|
printf (" * (threshold = %g)\n", THRESHOLD);
|
||||||
printf (" */\n\n");
|
printf (" */\n\n");
|
||||||
printf ("#define KERNEL_WIDTH %d\n", KERNEL_WIDTH);
|
printf ("#define KERNEL_WIDTH %d\n", KERNEL_WIDTH);
|
||||||
printf ("#define KERNEL_HEIGHT %d\n", KERNEL_HEIGHT);
|
printf ("#define KERNEL_HEIGHT %d\n", KERNEL_HEIGHT);
|
||||||
printf ("#define SUBSAMPLE %d\n", SUBSAMPLE);
|
printf ("#define KERNEL_SUBSAMPLE %d\n", SUBSAMPLE);
|
||||||
printf ("\n\n");
|
printf ("\n\n");
|
||||||
printf ("/* Brush pixel subsampling kernels */\n");
|
printf ("/* Brush pixel subsampling kernels */\n");
|
||||||
printf ("static const int subsample[%d][%d][%d] = {\n",
|
printf ("static const int subsample[%d][%d][%d] = {\n",
|
||||||
|
|
Loading…
Reference in New Issue