Commit dac875d3 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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/
parent 1e9c264a
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>
* app/gui/menus.c: moved "Merge Layers" and "Flatten Image" from
......
This diff is collapsed.
......@@ -23,6 +23,9 @@
#include "gimpdrawtool.h"
#define PAINT_TOOL_SUBSAMPLE 4
/* the different states that the painting function can be called with */
typedef enum /*< pdb-skip >*/
......@@ -83,6 +86,27 @@ struct _GimpPaintTool
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
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
......
This diff is collapsed.
......@@ -23,6 +23,9 @@
#include "gimpdrawtool.h"
#define PAINT_TOOL_SUBSAMPLE 4
/* the different states that the painting function can be called with */
typedef enum /*< pdb-skip >*/
......@@ -83,6 +86,27 @@ struct _GimpPaintTool
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
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
......
This diff is collapsed.
......@@ -23,6 +23,9 @@
#include "gimpdrawtool.h"
#define PAINT_TOOL_SUBSAMPLE 4
/* the different states that the painting function can be called with */
typedef enum /*< pdb-skip >*/
......@@ -83,6 +86,27 @@ struct _GimpPaintTool
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
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
......
......@@ -4,9 +4,9 @@
* (threshold = 0.25)
*/
#define KERNEL_WIDTH 3
#define KERNEL_HEIGHT 3
#define SUBSAMPLE 4
#define KERNEL_WIDTH 3
#define KERNEL_HEIGHT 3
#define KERNEL_SUBSAMPLE 4
/* Brush pixel subsampling kernels */
......
......@@ -89,9 +89,9 @@ main (int argc,
" * This file was generated using kernelgen as found in the tools dir.\n");
printf (" * (threshold = %g)\n", THRESHOLD);
printf (" */\n\n");
printf ("#define KERNEL_WIDTH %d\n", KERNEL_WIDTH);
printf ("#define KERNEL_HEIGHT %d\n", KERNEL_HEIGHT);
printf ("#define SUBSAMPLE %d\n", SUBSAMPLE);
printf ("#define KERNEL_WIDTH %d\n", KERNEL_WIDTH);
printf ("#define KERNEL_HEIGHT %d\n", KERNEL_HEIGHT);
printf ("#define KERNEL_SUBSAMPLE %d\n", SUBSAMPLE);
printf ("\n\n");
printf ("/* Brush pixel subsampling kernels */\n");
printf ("static const int subsample[%d][%d][%d] = {\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment