tools/pdbgen/pdb/fileops.pdb applied the patch from Wolfgang Hofer that
* tools/pdbgen/pdb/fileops.pdb * app/fileops_cmds.c: applied the patch from Wolfgang Hofer that should fix the problems saving jpeg with GAP. * app/paint_core.[ch]: preview length of brush-stroke in statusbar when drawing a line using <Shift>. Do we need the angle here too?? --Sven
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
Wed Sep 1 20:45:56 MEST 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* tools/pdbgen/pdb/fileops.pdb
|
||||||
|
* app/fileops_cmds.c: applied the patch from Wolfgang Hofer that
|
||||||
|
should fix the problems saving jpeg with GAP.
|
||||||
|
|
||||||
|
* app/paint_core.[ch]: preview length of brush-stroke in statusbar
|
||||||
|
when drawing a line using <Shift>. Do we need the angle here too??
|
||||||
|
|
||||||
Wed Sep 1 14:12:17 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
|
Wed Sep 1 14:12:17 CEST 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
* po/da.po, configure.in: added danish file from
|
* po/da.po, configure.in: added danish file from
|
||||||
Henrik Hansen <hh@mailserver.dk>
|
Henrik Hansen <hh@mailserver.dk>
|
||||||
|
@ -118,6 +118,7 @@ file_save_invoker (Argument *args)
|
|||||||
Argument *return_vals;
|
Argument *return_vals;
|
||||||
PlugInProcDef *file_proc;
|
PlugInProcDef *file_proc;
|
||||||
ProcRecord *proc;
|
ProcRecord *proc;
|
||||||
|
gint i;
|
||||||
|
|
||||||
file_proc = file_proc_find (save_procs, (gchar *) args[4].value.pdb_pointer);
|
file_proc = file_proc_find (save_procs, (gchar *) args[4].value.pdb_pointer);
|
||||||
if (!file_proc)
|
if (!file_proc)
|
||||||
@ -129,6 +130,13 @@ file_save_invoker (Argument *args)
|
|||||||
memset (new_args, 0, sizeof (Argument) * proc->num_args);
|
memset (new_args, 0, sizeof (Argument) * proc->num_args);
|
||||||
memcpy (new_args, args, sizeof (Argument) * 5);
|
memcpy (new_args, args, sizeof (Argument) * 5);
|
||||||
|
|
||||||
|
for (i=5; i<proc->num_args; i++)
|
||||||
|
{
|
||||||
|
new_args[i].arg_type = proc->args[i].arg_type;
|
||||||
|
if (proc->args[i].arg_type == PDB_STRING)
|
||||||
|
new_args[i].value.pdb_pointer = g_strdup("\0");
|
||||||
|
}
|
||||||
|
|
||||||
return_vals = procedural_db_execute (proc->name, new_args);
|
return_vals = procedural_db_execute (proc->name, new_args);
|
||||||
g_free (new_args);
|
g_free (new_args);
|
||||||
|
|
||||||
|
@ -43,7 +43,9 @@
|
|||||||
#define TARGET_HEIGHT 15
|
#define TARGET_HEIGHT 15
|
||||||
#define TARGET_WIDTH 15
|
#define TARGET_WIDTH 15
|
||||||
|
|
||||||
#define EPSILON 0.00001
|
#define EPSILON 0.00001
|
||||||
|
|
||||||
|
#define STATUSBAR_SIZE 128
|
||||||
|
|
||||||
/* global variables--for use in the various paint tools */
|
/* global variables--for use in the various paint tools */
|
||||||
PaintCore non_gui_paint_core;
|
PaintCore non_gui_paint_core;
|
||||||
@ -65,7 +67,7 @@ static void canvas_tiles_to_canvas_buf (PaintCore *);
|
|||||||
static void brush_to_canvas_buf (PaintCore *, MaskBuf *, int);
|
static void brush_to_canvas_buf (PaintCore *, MaskBuf *, int);
|
||||||
static void set_undo_tiles (GimpDrawable *, int, int, int, int);
|
static void set_undo_tiles (GimpDrawable *, int, int, int, int);
|
||||||
static void set_canvas_tiles (int, int, int, int);
|
static void set_canvas_tiles (int, int, int, int);
|
||||||
static int paint_core_invalidate_cache (GimpBrush *brush, gpointer *blah);
|
static int paint_core_invalidate_cache (GimpBrush *brush, gpointer *blah);
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
@ -184,7 +186,13 @@ paint_core_button_press (Tool *tool,
|
|||||||
paint_core->curytilt = bevent->ytilt;
|
paint_core->curytilt = bevent->ytilt;
|
||||||
paint_core->state = bevent->state;
|
paint_core->state = bevent->state;
|
||||||
|
|
||||||
/* if this is a new image, reinit the core vals */
|
if (gdisp_ptr != tool->gdisp_ptr)
|
||||||
|
{
|
||||||
|
/* initialize the statusbar display */
|
||||||
|
paint_core->context_id =
|
||||||
|
gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar), "paint");
|
||||||
|
}
|
||||||
|
/* if this is a new image, reinit the core vals */
|
||||||
if ((gdisp_ptr != tool->gdisp_ptr) || ! (bevent->state & GDK_SHIFT_MASK))
|
if ((gdisp_ptr != tool->gdisp_ptr) || ! (bevent->state & GDK_SHIFT_MASK))
|
||||||
{
|
{
|
||||||
/* initialize some values */
|
/* initialize some values */
|
||||||
@ -373,21 +381,24 @@ paint_core_cursor_update (Tool *tool,
|
|||||||
PaintCore * paint_core;
|
PaintCore * paint_core;
|
||||||
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
|
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
gchar status_str[STATUSBAR_SIZE];
|
||||||
|
|
||||||
gdisp = (GDisplay *) gdisp_ptr;
|
gdisp = (GDisplay *) gdisp_ptr;
|
||||||
paint_core = (PaintCore *) tool->private;
|
paint_core = (PaintCore *) tool->private;
|
||||||
|
|
||||||
/* undraw the current tool */
|
/* undraw the current tool */
|
||||||
draw_core_pause (paint_core->core, tool);
|
draw_core_pause (paint_core->core, tool);
|
||||||
|
if (paint_core->context_id)
|
||||||
|
gtk_statusbar_pop (GTK_STATUSBAR (gdisp->statusbar), paint_core->context_id);
|
||||||
|
|
||||||
if ((layer = gimage_get_active_layer (gdisp->gimage)))
|
if ((layer = gimage_get_active_layer (gdisp->gimage)))
|
||||||
{
|
{
|
||||||
/* If shift is down and this is not the first paint stroke, draw a line */
|
/* If shift is down and this is not the first paint stroke, draw a line */
|
||||||
if (gdisp_ptr == tool->gdisp_ptr && (mevent->state & GDK_SHIFT_MASK))
|
if (gdisp_ptr == tool->gdisp_ptr && (mevent->state & GDK_SHIFT_MASK))
|
||||||
{
|
{
|
||||||
|
gdouble dx, dy, d;
|
||||||
|
|
||||||
ctype = GDK_PENCIL;
|
ctype = GDK_PENCIL;
|
||||||
|
|
||||||
|
|
||||||
/* Get the current coordinates */
|
/* Get the current coordinates */
|
||||||
gdisplay_untransform_coords_f (gdisp,
|
gdisplay_untransform_coords_f (gdisp,
|
||||||
(double) mevent->x,
|
(double) mevent->x,
|
||||||
@ -395,16 +406,17 @@ paint_core_cursor_update (Tool *tool,
|
|||||||
&paint_core->curx,
|
&paint_core->curx,
|
||||||
&paint_core->cury, TRUE);
|
&paint_core->cury, TRUE);
|
||||||
|
|
||||||
|
dx = paint_core->curx - paint_core->lastx;
|
||||||
|
dy = paint_core->cury - paint_core->lasty;
|
||||||
|
|
||||||
/* restrict to horizontal/vertical lines, if modifiers are pressed */
|
/* restrict to horizontal/vertical lines, if modifiers are pressed */
|
||||||
if (mevent->state & GDK_MOD1_MASK)
|
if (mevent->state & GDK_MOD1_MASK)
|
||||||
{
|
{
|
||||||
if (mevent->state & GDK_CONTROL_MASK)
|
if (mevent->state & GDK_CONTROL_MASK)
|
||||||
{
|
{
|
||||||
double dx, dy, d;
|
|
||||||
|
|
||||||
dx = paint_core->curx - paint_core->lastx;
|
dx = paint_core->curx - paint_core->lastx;
|
||||||
dy = paint_core->cury - paint_core->lasty;
|
dy = paint_core->cury - paint_core->lasty;
|
||||||
d = (fabs(dx) + fabs(dy)) / 2;
|
d = (fabs(dx) + fabs(dy)) / 2;
|
||||||
|
|
||||||
paint_core->curx = paint_core->lastx + ((dx < 0) ? -d : d);
|
paint_core->curx = paint_core->lastx + ((dx < 0) ? -d : d);
|
||||||
paint_core->cury = paint_core->lasty + ((dy < 0) ? -d : d);
|
paint_core->cury = paint_core->lasty + ((dy < 0) ? -d : d);
|
||||||
@ -415,6 +427,29 @@ paint_core_cursor_update (Tool *tool,
|
|||||||
else if (mevent->state & GDK_CONTROL_MASK)
|
else if (mevent->state & GDK_CONTROL_MASK)
|
||||||
paint_core->cury = paint_core->lasty;
|
paint_core->cury = paint_core->lasty;
|
||||||
|
|
||||||
|
/* show distance in statusbar */
|
||||||
|
dx = paint_core->curx - paint_core->lastx;
|
||||||
|
dy = paint_core->cury - paint_core->lasty;
|
||||||
|
|
||||||
|
if (gdisp->dot_for_dot)
|
||||||
|
{
|
||||||
|
d = sqrt (SQR (dx) + SQR (dy));
|
||||||
|
g_snprintf (status_str, STATUSBAR_SIZE, "%.1f %s", d, _("pixels"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gchar *format_str = g_strdup_printf ("%%.%df %s",
|
||||||
|
gimp_unit_get_digits (gdisp->gimage->unit),
|
||||||
|
gimp_unit_get_symbol (gdisp->gimage->unit));
|
||||||
|
d = gimp_unit_get_factor (gdisp->gimage->unit) *
|
||||||
|
sqrt (SQR (dx / gdisp->gimage->xresolution) + SQR (dy / gdisp->gimage->yresolution));
|
||||||
|
|
||||||
|
g_snprintf (status_str, STATUSBAR_SIZE, format_str, d);
|
||||||
|
g_free (format_str);
|
||||||
|
}
|
||||||
|
gtk_statusbar_push (GTK_STATUSBAR (gdisp->statusbar), paint_core->context_id,
|
||||||
|
status_str);
|
||||||
|
|
||||||
if (paint_core->core->gc == NULL)
|
if (paint_core->core->gc == NULL)
|
||||||
draw_core_start (paint_core->core, gdisp->canvas->window, tool);
|
draw_core_start (paint_core->core, gdisp->canvas->window, tool);
|
||||||
else
|
else
|
||||||
@ -545,6 +580,7 @@ paint_core_new (ToolType type)
|
|||||||
|
|
||||||
private->pick_colors = FALSE;
|
private->pick_colors = FALSE;
|
||||||
private->flags = 0;
|
private->flags = 0;
|
||||||
|
private->context_id = 0;
|
||||||
|
|
||||||
tool->private = (void *) private;
|
tool->private = (void *) private;
|
||||||
|
|
||||||
|
@ -42,41 +42,43 @@ typedef enum
|
|||||||
typedef void * (* PaintFunc) (PaintCore *, GimpDrawable *, int);
|
typedef void * (* PaintFunc) (PaintCore *, GimpDrawable *, int);
|
||||||
struct _paint_core
|
struct _paint_core
|
||||||
{
|
{
|
||||||
DrawCore * core; /* Core select object */
|
DrawCore * core; /* Core select object */
|
||||||
|
|
||||||
double startx; /* starting x coord */
|
double startx; /* starting x coord */
|
||||||
double starty; /* starting y coord */
|
double starty; /* starting y coord */
|
||||||
double startpressure; /* starting pressure */
|
double startpressure; /* starting pressure */
|
||||||
double startxtilt; /* starting xtilt */
|
double startxtilt; /* starting xtilt */
|
||||||
double startytilt; /* starting ytilt */
|
double startytilt; /* starting ytilt */
|
||||||
|
|
||||||
double curx; /* current x coord */
|
double curx; /* current x coord */
|
||||||
double cury; /* current y coord */
|
double cury; /* current y coord */
|
||||||
double curpressure; /* current pressure */
|
double curpressure; /* current pressure */
|
||||||
double curxtilt; /* current xtilt */
|
double curxtilt; /* current xtilt */
|
||||||
double curytilt; /* current ytilt */
|
double curytilt; /* current ytilt */
|
||||||
|
|
||||||
double lastx; /* last x coord */
|
double lastx; /* last x coord */
|
||||||
double lasty; /* last y coord */
|
double lasty; /* last y coord */
|
||||||
double lastpressure; /* last pressure */
|
double lastpressure; /* last pressure */
|
||||||
double lastxtilt; /* last xtilt */
|
double lastxtilt; /* last xtilt */
|
||||||
double lastytilt; /* last ytilt */
|
double lastytilt; /* last ytilt */
|
||||||
|
|
||||||
int state; /* state of buttons and keys */
|
int state; /* state of buttons and keys */
|
||||||
|
|
||||||
double distance; /* distance traveled by brush */
|
double distance; /* distance traveled by brush */
|
||||||
double spacing; /* distance traveled by brush */
|
double spacing; /* distance traveled by brush */
|
||||||
|
|
||||||
int x1, y1; /* image space coordinate */
|
int x1, y1; /* image space coordinate */
|
||||||
int x2, y2; /* image space coords */
|
int x2, y2; /* image space coords */
|
||||||
|
|
||||||
GimpBrush * brush; /* current brush */
|
GimpBrush * brush; /* current brush */
|
||||||
|
|
||||||
PaintFunc paint_func; /* painting function */
|
PaintFunc paint_func; /* painting function */
|
||||||
|
|
||||||
int pick_colors; /* pick color if ctl or alt is pressed */
|
int pick_colors; /* pick color if ctrl or alt is pressed */
|
||||||
int pick_state; /* was ctl or alt pressed when clicked? */
|
int pick_state; /* was ctrl or alt pressed when clicked? */
|
||||||
int flags; /* tool flags, see ToolFlags above */
|
int flags; /* tool flags, see ToolFlags above */
|
||||||
|
|
||||||
|
guint context_id; /* for the statusbar */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern PaintCore non_gui_paint_core;
|
extern PaintCore non_gui_paint_core;
|
||||||
|
@ -43,7 +43,9 @@
|
|||||||
#define TARGET_HEIGHT 15
|
#define TARGET_HEIGHT 15
|
||||||
#define TARGET_WIDTH 15
|
#define TARGET_WIDTH 15
|
||||||
|
|
||||||
#define EPSILON 0.00001
|
#define EPSILON 0.00001
|
||||||
|
|
||||||
|
#define STATUSBAR_SIZE 128
|
||||||
|
|
||||||
/* global variables--for use in the various paint tools */
|
/* global variables--for use in the various paint tools */
|
||||||
PaintCore non_gui_paint_core;
|
PaintCore non_gui_paint_core;
|
||||||
@ -65,7 +67,7 @@ static void canvas_tiles_to_canvas_buf (PaintCore *);
|
|||||||
static void brush_to_canvas_buf (PaintCore *, MaskBuf *, int);
|
static void brush_to_canvas_buf (PaintCore *, MaskBuf *, int);
|
||||||
static void set_undo_tiles (GimpDrawable *, int, int, int, int);
|
static void set_undo_tiles (GimpDrawable *, int, int, int, int);
|
||||||
static void set_canvas_tiles (int, int, int, int);
|
static void set_canvas_tiles (int, int, int, int);
|
||||||
static int paint_core_invalidate_cache (GimpBrush *brush, gpointer *blah);
|
static int paint_core_invalidate_cache (GimpBrush *brush, gpointer *blah);
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
@ -184,7 +186,13 @@ paint_core_button_press (Tool *tool,
|
|||||||
paint_core->curytilt = bevent->ytilt;
|
paint_core->curytilt = bevent->ytilt;
|
||||||
paint_core->state = bevent->state;
|
paint_core->state = bevent->state;
|
||||||
|
|
||||||
/* if this is a new image, reinit the core vals */
|
if (gdisp_ptr != tool->gdisp_ptr)
|
||||||
|
{
|
||||||
|
/* initialize the statusbar display */
|
||||||
|
paint_core->context_id =
|
||||||
|
gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar), "paint");
|
||||||
|
}
|
||||||
|
/* if this is a new image, reinit the core vals */
|
||||||
if ((gdisp_ptr != tool->gdisp_ptr) || ! (bevent->state & GDK_SHIFT_MASK))
|
if ((gdisp_ptr != tool->gdisp_ptr) || ! (bevent->state & GDK_SHIFT_MASK))
|
||||||
{
|
{
|
||||||
/* initialize some values */
|
/* initialize some values */
|
||||||
@ -373,21 +381,24 @@ paint_core_cursor_update (Tool *tool,
|
|||||||
PaintCore * paint_core;
|
PaintCore * paint_core;
|
||||||
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
|
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
gchar status_str[STATUSBAR_SIZE];
|
||||||
|
|
||||||
gdisp = (GDisplay *) gdisp_ptr;
|
gdisp = (GDisplay *) gdisp_ptr;
|
||||||
paint_core = (PaintCore *) tool->private;
|
paint_core = (PaintCore *) tool->private;
|
||||||
|
|
||||||
/* undraw the current tool */
|
/* undraw the current tool */
|
||||||
draw_core_pause (paint_core->core, tool);
|
draw_core_pause (paint_core->core, tool);
|
||||||
|
if (paint_core->context_id)
|
||||||
|
gtk_statusbar_pop (GTK_STATUSBAR (gdisp->statusbar), paint_core->context_id);
|
||||||
|
|
||||||
if ((layer = gimage_get_active_layer (gdisp->gimage)))
|
if ((layer = gimage_get_active_layer (gdisp->gimage)))
|
||||||
{
|
{
|
||||||
/* If shift is down and this is not the first paint stroke, draw a line */
|
/* If shift is down and this is not the first paint stroke, draw a line */
|
||||||
if (gdisp_ptr == tool->gdisp_ptr && (mevent->state & GDK_SHIFT_MASK))
|
if (gdisp_ptr == tool->gdisp_ptr && (mevent->state & GDK_SHIFT_MASK))
|
||||||
{
|
{
|
||||||
|
gdouble dx, dy, d;
|
||||||
|
|
||||||
ctype = GDK_PENCIL;
|
ctype = GDK_PENCIL;
|
||||||
|
|
||||||
|
|
||||||
/* Get the current coordinates */
|
/* Get the current coordinates */
|
||||||
gdisplay_untransform_coords_f (gdisp,
|
gdisplay_untransform_coords_f (gdisp,
|
||||||
(double) mevent->x,
|
(double) mevent->x,
|
||||||
@ -395,16 +406,17 @@ paint_core_cursor_update (Tool *tool,
|
|||||||
&paint_core->curx,
|
&paint_core->curx,
|
||||||
&paint_core->cury, TRUE);
|
&paint_core->cury, TRUE);
|
||||||
|
|
||||||
|
dx = paint_core->curx - paint_core->lastx;
|
||||||
|
dy = paint_core->cury - paint_core->lasty;
|
||||||
|
|
||||||
/* restrict to horizontal/vertical lines, if modifiers are pressed */
|
/* restrict to horizontal/vertical lines, if modifiers are pressed */
|
||||||
if (mevent->state & GDK_MOD1_MASK)
|
if (mevent->state & GDK_MOD1_MASK)
|
||||||
{
|
{
|
||||||
if (mevent->state & GDK_CONTROL_MASK)
|
if (mevent->state & GDK_CONTROL_MASK)
|
||||||
{
|
{
|
||||||
double dx, dy, d;
|
|
||||||
|
|
||||||
dx = paint_core->curx - paint_core->lastx;
|
dx = paint_core->curx - paint_core->lastx;
|
||||||
dy = paint_core->cury - paint_core->lasty;
|
dy = paint_core->cury - paint_core->lasty;
|
||||||
d = (fabs(dx) + fabs(dy)) / 2;
|
d = (fabs(dx) + fabs(dy)) / 2;
|
||||||
|
|
||||||
paint_core->curx = paint_core->lastx + ((dx < 0) ? -d : d);
|
paint_core->curx = paint_core->lastx + ((dx < 0) ? -d : d);
|
||||||
paint_core->cury = paint_core->lasty + ((dy < 0) ? -d : d);
|
paint_core->cury = paint_core->lasty + ((dy < 0) ? -d : d);
|
||||||
@ -415,6 +427,29 @@ paint_core_cursor_update (Tool *tool,
|
|||||||
else if (mevent->state & GDK_CONTROL_MASK)
|
else if (mevent->state & GDK_CONTROL_MASK)
|
||||||
paint_core->cury = paint_core->lasty;
|
paint_core->cury = paint_core->lasty;
|
||||||
|
|
||||||
|
/* show distance in statusbar */
|
||||||
|
dx = paint_core->curx - paint_core->lastx;
|
||||||
|
dy = paint_core->cury - paint_core->lasty;
|
||||||
|
|
||||||
|
if (gdisp->dot_for_dot)
|
||||||
|
{
|
||||||
|
d = sqrt (SQR (dx) + SQR (dy));
|
||||||
|
g_snprintf (status_str, STATUSBAR_SIZE, "%.1f %s", d, _("pixels"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gchar *format_str = g_strdup_printf ("%%.%df %s",
|
||||||
|
gimp_unit_get_digits (gdisp->gimage->unit),
|
||||||
|
gimp_unit_get_symbol (gdisp->gimage->unit));
|
||||||
|
d = gimp_unit_get_factor (gdisp->gimage->unit) *
|
||||||
|
sqrt (SQR (dx / gdisp->gimage->xresolution) + SQR (dy / gdisp->gimage->yresolution));
|
||||||
|
|
||||||
|
g_snprintf (status_str, STATUSBAR_SIZE, format_str, d);
|
||||||
|
g_free (format_str);
|
||||||
|
}
|
||||||
|
gtk_statusbar_push (GTK_STATUSBAR (gdisp->statusbar), paint_core->context_id,
|
||||||
|
status_str);
|
||||||
|
|
||||||
if (paint_core->core->gc == NULL)
|
if (paint_core->core->gc == NULL)
|
||||||
draw_core_start (paint_core->core, gdisp->canvas->window, tool);
|
draw_core_start (paint_core->core, gdisp->canvas->window, tool);
|
||||||
else
|
else
|
||||||
@ -545,6 +580,7 @@ paint_core_new (ToolType type)
|
|||||||
|
|
||||||
private->pick_colors = FALSE;
|
private->pick_colors = FALSE;
|
||||||
private->flags = 0;
|
private->flags = 0;
|
||||||
|
private->context_id = 0;
|
||||||
|
|
||||||
tool->private = (void *) private;
|
tool->private = (void *) private;
|
||||||
|
|
||||||
|
@ -42,41 +42,43 @@ typedef enum
|
|||||||
typedef void * (* PaintFunc) (PaintCore *, GimpDrawable *, int);
|
typedef void * (* PaintFunc) (PaintCore *, GimpDrawable *, int);
|
||||||
struct _paint_core
|
struct _paint_core
|
||||||
{
|
{
|
||||||
DrawCore * core; /* Core select object */
|
DrawCore * core; /* Core select object */
|
||||||
|
|
||||||
double startx; /* starting x coord */
|
double startx; /* starting x coord */
|
||||||
double starty; /* starting y coord */
|
double starty; /* starting y coord */
|
||||||
double startpressure; /* starting pressure */
|
double startpressure; /* starting pressure */
|
||||||
double startxtilt; /* starting xtilt */
|
double startxtilt; /* starting xtilt */
|
||||||
double startytilt; /* starting ytilt */
|
double startytilt; /* starting ytilt */
|
||||||
|
|
||||||
double curx; /* current x coord */
|
double curx; /* current x coord */
|
||||||
double cury; /* current y coord */
|
double cury; /* current y coord */
|
||||||
double curpressure; /* current pressure */
|
double curpressure; /* current pressure */
|
||||||
double curxtilt; /* current xtilt */
|
double curxtilt; /* current xtilt */
|
||||||
double curytilt; /* current ytilt */
|
double curytilt; /* current ytilt */
|
||||||
|
|
||||||
double lastx; /* last x coord */
|
double lastx; /* last x coord */
|
||||||
double lasty; /* last y coord */
|
double lasty; /* last y coord */
|
||||||
double lastpressure; /* last pressure */
|
double lastpressure; /* last pressure */
|
||||||
double lastxtilt; /* last xtilt */
|
double lastxtilt; /* last xtilt */
|
||||||
double lastytilt; /* last ytilt */
|
double lastytilt; /* last ytilt */
|
||||||
|
|
||||||
int state; /* state of buttons and keys */
|
int state; /* state of buttons and keys */
|
||||||
|
|
||||||
double distance; /* distance traveled by brush */
|
double distance; /* distance traveled by brush */
|
||||||
double spacing; /* distance traveled by brush */
|
double spacing; /* distance traveled by brush */
|
||||||
|
|
||||||
int x1, y1; /* image space coordinate */
|
int x1, y1; /* image space coordinate */
|
||||||
int x2, y2; /* image space coords */
|
int x2, y2; /* image space coords */
|
||||||
|
|
||||||
GimpBrush * brush; /* current brush */
|
GimpBrush * brush; /* current brush */
|
||||||
|
|
||||||
PaintFunc paint_func; /* painting function */
|
PaintFunc paint_func; /* painting function */
|
||||||
|
|
||||||
int pick_colors; /* pick color if ctl or alt is pressed */
|
int pick_colors; /* pick color if ctrl or alt is pressed */
|
||||||
int pick_state; /* was ctl or alt pressed when clicked? */
|
int pick_state; /* was ctrl or alt pressed when clicked? */
|
||||||
int flags; /* tool flags, see ToolFlags above */
|
int flags; /* tool flags, see ToolFlags above */
|
||||||
|
|
||||||
|
guint context_id; /* for the statusbar */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern PaintCore non_gui_paint_core;
|
extern PaintCore non_gui_paint_core;
|
||||||
|
@ -125,7 +125,7 @@ HELP
|
|||||||
headers => [ qw(<string.h>) ],
|
headers => [ qw(<string.h>) ],
|
||||||
proc => [ 'proc->name', 'new_args' ],
|
proc => [ 'proc->name', 'new_args' ],
|
||||||
args => [ 'new_args', 'return_vals' ],
|
args => [ 'new_args', 'return_vals' ],
|
||||||
vars => [ 'PlugInProcDef *file_proc', 'ProcRecord *proc' ],
|
vars => [ 'PlugInProcDef *file_proc', 'ProcRecord *proc', 'gint i' ],
|
||||||
code => <<'CODE'
|
code => <<'CODE'
|
||||||
{
|
{
|
||||||
file_proc = file_proc_find (save_procs, %%raw_filename%%);
|
file_proc = file_proc_find (save_procs, %%raw_filename%%);
|
||||||
@ -138,6 +138,13 @@ HELP
|
|||||||
memset (new_args, 0, sizeof (%%argtype%%) * proc->num_args);
|
memset (new_args, 0, sizeof (%%argtype%%) * proc->num_args);
|
||||||
memcpy (new_args, args, sizeof (%%argtype%%) * 5);
|
memcpy (new_args, args, sizeof (%%argtype%%) * 5);
|
||||||
|
|
||||||
|
for (i=5; i<proc->num_args; i++)
|
||||||
|
{
|
||||||
|
new_args[i].arg_type = proc->args[i].arg_type;
|
||||||
|
if (proc->args[i].arg_type == PDB_STRING)
|
||||||
|
new_args[i].value.pdb_pointer = g_strdup("\0");
|
||||||
|
}
|
||||||
|
|
||||||
return_vals = %%exec%%;
|
return_vals = %%exec%%;
|
||||||
g_free (new_args);
|
g_free (new_args);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user