moved Magnify into the Transformation tools category. This is not entirely

2000-05-22  Sven Neumann  <sven@gimp.org>

* app/tools.c: moved Magnify into the Transformation tools
category. This is not entirely correct, but at least the
tools are now grouped as they appear in the toolbox.

* plug-ins/common/flarefx.c: applied modified version of
gimp-timecop-200005-4.flarefx which adds a scaled down
flarefx to tthe preview.


--Sven
This commit is contained in:
Sven Neumann 2000-05-22 17:39:15 +00:00 committed by Sven Neumann
parent 1590cecfe1
commit 95500f2d40
10 changed files with 361 additions and 256 deletions

View File

@ -1,3 +1,13 @@
2000-05-22 Sven Neumann <sven@gimp.org>
* app/tools.c: moved Magnify into the Transformation tools
category. This is not entirely correct, but at least the
tools are now grouped as they appear in the toolbox.
* plug-ins/common/flarefx.c: applied modified version of
gimp-timecop-200005-4.flarefx which adds a scaled down
flarefx to tthe preview.
2000-05-22 Michael Natterer <mitch@gimp.org>
* plug-ins/*: s/gimp_plugin_help_func/gimp_standard_help_func/

View File

@ -211,7 +211,7 @@ ToolInfo tool_info[] =
{
NULL,
N_("Magnify"),
N_("/Tools/Magnify"),
N_("/Tools/Transform Tools/Magnify"),
"<shift>M",
(char **) magnify_bits,
NULL,

View File

@ -211,7 +211,7 @@ ToolInfo tool_info[] =
{
NULL,
N_("Magnify"),
N_("/Tools/Magnify"),
N_("/Tools/Transform Tools/Magnify"),
"<shift>M",
(char **) magnify_bits,
NULL,

View File

@ -1,6 +1,6 @@
/*
* This is the FlareFX plug-in for the GIMP 0.99
* Version 1.04
* Version 1.05
*
* Copyright (C) 1997-1998 Karl-Johan Andersson (t96kja@student.tdb.uu.se)
*
@ -31,6 +31,15 @@
* - more flare types, more control (color, size, intensity...)
*
* Missing something? - please contact me!
*
* May 2000 - tim copperfield [timecop@japan.co.jp]
* preview window now draws a "mini flarefx" to show approximate
* positioning after final render.
*
* Note, the algorithm does not render into an alpha channel.
* Therefore, changed RGB* to RGB in the capabilities.
* Someone who actually knows something about graphics should
* take a look to see why this doesnt render on alpha channel :)
*
*/
@ -49,7 +58,6 @@
/* --- Defines --- */
#define ENTRY_WIDTH 75
#define PREVIEW_SIZE 100
#define PREVIEW_MASK (GDK_EXPOSURE_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_BUTTON1_MOTION_MASK)
@ -103,9 +111,6 @@ typedef struct
gint bpp;
GtkObject *xadj;
GtkObject *yadj;
GtkWidget *preview;
gint pwidth;
gint pheight;
gint cursor;
gint curx, cury; /* x,y of cursor in preview */
gint oldx, oldy;
@ -120,16 +125,21 @@ static void run (gchar *name,
gint *nreturn_vals,
GParam **return_vals);
static void FlareFX (GDrawable *drawable);
static void FlareFX (GDrawable *drawable,
gint preview_mode);
static void fill_preview_with_thumb (GtkWidget *preview_widget,
gint32 drawable_ID);
static GtkWidget *preview_widget (GDrawable *drawable);
static gint flare_dialog (GDrawable *drawable);
static void flare_ok_callback (GtkWidget *widget,
gpointer data);
static gint flare_dialog (GDrawable *drawable);
static void flare_ok_callback (GtkWidget *widget,
gpointer data);
static void flare_show_cursor_callback (GtkWidget *widget,
gpointer data);
static GtkWidget * flare_center_create (GDrawable *drawable);
static void flare_center_destroy (GtkWidget *widget,
gpointer data);
static void flare_center_preview_init (FlareCenter *center);
static void flare_center_draw (FlareCenter *center,
gint update);
static void flare_center_adjustment_update (GtkAdjustment *adjustment,
@ -140,17 +150,17 @@ static gint flare_center_preview_expose (GtkWidget *widget,
static gint flare_center_preview_events (GtkWidget *widget,
GdkEvent *event);
void mcolor (guchar *s, gfloat h);
void mglow (guchar *s, gfloat h);
void minner (guchar *s, gfloat h);
void mouter (guchar *s, gfloat h);
void mhalo (guchar *s, gfloat h);
void initref (gint sx, gint sy, gint width, gint height, gint matt);
void fixpix (guchar *data, float procent, RGBfloat colpro);
void mrt1 (guchar *s, gint i, gint col, gint row);
void mrt2 (guchar *s, gint i, gint col, gint row);
void mrt3 (guchar *s, gint i, gint col, gint row);
void mrt4 (guchar *s, gint i, gint col, gint row);
static void mcolor (guchar *s, gfloat h);
static void mglow (guchar *s, gfloat h);
static void minner (guchar *s, gfloat h);
static void mouter (guchar *s, gfloat h);
static void mhalo (guchar *s, gfloat h);
static void initref (gint sx, gint sy, gint width, gint height, gint matt);
static void fixpix (guchar *data, float procent, RGBfloat colpro);
static void mrt1 (guchar *s, gint i, gint col, gint row);
static void mrt2 (guchar *s, gint i, gint col, gint row);
static void mrt3 (guchar *s, gint i, gint col, gint row);
static void mrt4 (guchar *s, gint i, gint col, gint row);
/* --- Variables --- */
GPlugInInfo PLUG_IN_INFO =
@ -171,12 +181,15 @@ static FlareInterface fint =
FALSE /* run */
};
gfloat scolor, sglow, sinner, souter; /* size */
gfloat shalo;
gint xs, ys;
gint numref;
RGBfloat color, glow, inner, outer, halo;
Reflect ref1[19];
static gfloat scolor, sglow, sinner, souter; /* size */
static gfloat shalo;
static gint xs, ys;
static gint numref;
static RGBfloat color, glow, inner, outer, halo;
static Reflect ref1[19];
static guchar *preview_bits;
static GtkWidget *preview;
static gboolean show_cursor = 0;
/* --- Functions --- */
MAIN ()
@ -196,12 +209,12 @@ query (void)
gimp_install_procedure ("plug_in_flarefx",
"Add lens flare effects",
"More here later",
"Adds a lens flare effects. Makes your image look like it was snapped with a cheap camera with a lot of lens :)",
"Karl-Johan Andersson", /* Author */
"Karl-Johan Andersson", /* Copyright */
"1998",
"May 2000",
N_("<Image>/Filters/Light Effects/FlareFX..."),
"RGB*",
"RGB",
PROC_PLUG_IN,
nargs, 0,
args, NULL);
@ -276,7 +289,7 @@ run (gchar *name,
gimp_progress_init (_("Render Flare..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
FlareFX (drawable);
FlareFX (drawable, 0);
if (run_mode != RUN_NONINTERACTIVE)
gimp_displays_flush ();
@ -284,6 +297,7 @@ run (gchar *name,
/* Store data */
if (run_mode == RUN_INTERACTIVE)
gimp_set_data ("plug_in_flarefx", &fvals, sizeof (FlareValues));
g_free(preview_bits);
}
else
{
@ -297,11 +311,15 @@ run (gchar *name,
gimp_drawable_detach (drawable);
}
static gint
flare_dialog (GDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *main_vbox;
GtkWidget *toggle;
GtkWidget *frame;
FlareCenter *center;
gimp_ui_init ("flarefx", TRUE);
@ -322,10 +340,29 @@ flare_dialog (GDrawable *drawable)
NULL);
/* parameter settings */
main_vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
frame = flare_center_create (drawable);
center = gtk_object_get_user_data (GTK_OBJECT (frame));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
/* show / hide cursor */
toggle = gtk_check_button_new_with_label (_("Show Cursor"));
gtk_container_set_border_width (GTK_CONTAINER (toggle), 6);
gtk_object_set_user_data (GTK_OBJECT (toggle), center);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), show_cursor);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
GTK_SIGNAL_FUNC (flare_show_cursor_callback),
&show_cursor);
gtk_box_pack_start (GTK_BOX (main_vbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
gtk_widget_show (frame);
gtk_widget_show (dlg);
@ -346,9 +383,21 @@ flare_ok_callback (GtkWidget *widget,
gtk_widget_destroy (GTK_WIDGET (data));
}
static void
flare_show_cursor_callback (GtkWidget *widget,
gpointer data)
{
FlareCenter *center;
center = gtk_object_get_user_data (GTK_OBJECT (widget));
gimp_toggle_button_update (widget, data);
FlareFX (center->drawable, TRUE);
}
/* --- Filter functions --- */
static void
FlareFX (GDrawable *drawable)
FlareFX (GDrawable *drawable,
gboolean preview_mode)
{
GPixelRgn srcPR, destPR;
gint width, height;
@ -360,32 +409,46 @@ FlareFX (GDrawable *drawable)
gint matt;
gfloat hyp;
/* Get the input area. This is the bounding box of the selection in
* the image (or the entire image if there is no selection). Only
* operating on the input area is simply an optimization. It doesn't
* need to be done for correct operation. (It simply makes it go
* faster, since fewer pixels need to be operated on).
*/
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
if (preview_mode)
{
gdouble scale;
width = GTK_PREVIEW (preview)->buffer_width;
height = GTK_PREVIEW (preview)->buffer_height;
bytes = GTK_PREVIEW (preview)->bpp;
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
scale = (gdouble)(x2 - x1) / (gdouble)width;
xs = (gdouble)fvals.posx / scale;
scale = (gdouble)(y2 - y1) / (gdouble)height;
ys = (gdouble)fvals.posy / scale;
/* now, we clobber the x1 x2 y1 y2 with the real sizes */
x1=y1=0;
x2=width;
y2=height;
}
else
{
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
width = drawable->width;
height = drawable->height;
bytes = drawable->bpp;
xs = fvals.posx; /* set x,y of flare center */
ys = fvals.posy;
}
/* Get the size of the input image. (This will/must be the same
* as the size of the output image.
*/
width = drawable->width;
height = drawable->height;
bytes = drawable->bpp;
matt = width;
/* allocate row buffers */
cur_row = (guchar *) malloc ((x2 - x1) * bytes);
dest = (guchar *) malloc ((x2 - x1) * bytes);
cur_row = g_new (guchar, (x2 - x1) * bytes);
dest = g_new (guchar, (x2 - x1) * bytes);
/* initialize the pixel regions */
gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, width, height, FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, 0, 0, width, height, TRUE, TRUE);
xs = fvals.posx;
ys = fvals.posy;
if (!preview_mode)
{
/* initialize the pixel regions */
gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, width, height, FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, 0, 0, width, height, TRUE, TRUE);
}
scolor = (gfloat)matt * 0.0375;
sglow = (gfloat)matt * 0.078125;
@ -404,7 +467,11 @@ FlareFX (GDrawable *drawable)
/* Loop through the rows */
for (row = y1; row < y2; row++) /* y-coord */
{
gimp_pixel_rgn_get_row (&srcPR, cur_row, x1, row, x2-x1);
if (preview_mode)
memcpy(cur_row,preview_bits+(width*bytes*row),width*bytes);
else
gimp_pixel_rgn_get_row (&srcPR, cur_row, x1, row, x2-x1);
d = dest;
s = cur_row;
for (col = x1; col < x2; col++) /* x-coord */
@ -415,41 +482,58 @@ FlareFX (GDrawable *drawable)
minner (s, hyp); /* make inner */
mouter (s, hyp); /* make outer */
mhalo (s, hyp); /* make halo */
for (i = 0; i < numref; i++) {
switch (ref1[i].type) {
case 1:
mrt1 (s, i, col, row);
break;
case 2:
mrt2 (s, i, col, row);
break;
case 3:
mrt3 (s, i, col, row);
break;
case 4:
mrt4 (s, i, col, row);
break;
for (i = 0; i < numref; i++)
{
switch (ref1[i].type)
{
case 1:
mrt1 (s, i, col, row);
break;
case 2:
mrt2 (s, i, col, row);
break;
case 3:
mrt3 (s, i, col, row);
break;
case 4:
mrt4 (s, i, col, row);
break;
}
}
}
s+=bytes;
}
/* store the dest */
gimp_pixel_rgn_set_row (&destPR, cur_row, x1, row, (x2 - x1));
if (preview_mode)
{
memcpy (GTK_PREVIEW (preview)->buffer + (width * bytes * row),
cur_row, width * bytes);
}
else
{
/* store the dest */
gimp_pixel_rgn_set_row (&destPR, cur_row, x1, row, (x2 - x1));
}
if ((row % 5) == 0)
if ((row % 5) == 0 && !preview_mode)
gimp_progress_update ((double) row / (double) (y2 - y1));
}
/* update the textured region */
gimp_drawable_flush (drawable);
gimp_drawable_merge_shadow (drawable->id, TRUE);
gimp_drawable_update (drawable->id, x1, y1, (x2 - x1), (y2 - y1));
if (preview_mode)
{
gtk_widget_queue_draw (preview);
}
else
{
/* update the textured region */
gimp_drawable_flush (drawable);
gimp_drawable_merge_shadow (drawable->id, TRUE);
gimp_drawable_update (drawable->id, x1, y1, (x2 - x1), (y2 - y1));
}
free (cur_row);
free (dest);
}
void
static void
mcolor (guchar *s,
gfloat h)
{
@ -464,7 +548,7 @@ mcolor (guchar *s,
}
}
void
static void
mglow (guchar *s,
gfloat h)
{
@ -479,7 +563,7 @@ mglow (guchar *s,
}
}
void
static void
minner (guchar *s,
gfloat h)
{
@ -494,7 +578,7 @@ minner (guchar *s,
}
}
void
static void
mouter (guchar *s,
gfloat h)
{
@ -506,7 +590,7 @@ mouter (guchar *s,
fixpix (s, procent, outer);
}
void
static void
mhalo (guchar *s,
gfloat h)
{
@ -519,7 +603,7 @@ mhalo (guchar *s,
fixpix (s, 1.0 - procent, halo);
}
void
static void
fixpix (guchar *data,
float procent,
RGBfloat colpro)
@ -529,7 +613,7 @@ fixpix (guchar *data,
data[2] = data[2] + (255 - data[2]) * procent * colpro.b;
}
void
static void
initref (gint sx,
gint sy,
gint width,
@ -600,7 +684,7 @@ initref (gint sx,
ref1[18].ccol.r=17.0/255.0; ref1[18].ccol.g=4.0/255.0; ref1[18].ccol.b=0.0;
}
void
static void
mrt1 (guchar *s,
gint i,
gint col,
@ -617,7 +701,7 @@ mrt1 (guchar *s,
}
}
void
static void
mrt2 (guchar *s,
gint i,
gint col,
@ -634,7 +718,7 @@ mrt2 (guchar *s,
}
}
void
static void
mrt3 (guchar *s,
gint i,
gint col,
@ -651,7 +735,7 @@ mrt3 (guchar *s,
}
}
void
static void
mrt4 (guchar *s,
gint i,
gint col,
@ -671,9 +755,10 @@ mrt4 (guchar *s,
A frame that contains one preview and 2 entrys, used for positioning
of the center of Flare.
This whole thing is just too ugly, but I don't want to dig into it
- tim
==================================================================*/
/*
* Create new CenterFrame, and return it (GtkFrame).
*/
@ -686,7 +771,6 @@ flare_center_create (GDrawable *drawable)
GtkWidget *table;
GtkWidget *label;
GtkWidget *pframe;
GtkWidget *preview;
GtkWidget *spinbutton;
center = g_new (FlareCenter, 1);
@ -759,7 +843,7 @@ flare_center_create (GDrawable *drawable)
gtk_table_attach (GTK_TABLE (table), pframe, 0, 4, 1, 2, 0, 0, 0, 0);
/* PREVIEW */
center->preview = preview = gtk_preview_new (center->bpp==3 ? GTK_PREVIEW_COLOR : GTK_PREVIEW_GRAYSCALE);
preview = preview_widget (drawable);
gtk_object_set_user_data (GTK_OBJECT (preview), center);
gtk_widget_set_events (GTK_WIDGET (preview), PREVIEW_MASK);
gtk_signal_connect_after (GTK_OBJECT (preview), "expose_event",
@ -768,38 +852,22 @@ flare_center_create (GDrawable *drawable)
gtk_signal_connect (GTK_OBJECT (preview), "event",
(GtkSignalFunc) flare_center_preview_events,
center);
gtk_container_add (GTK_CONTAINER (pframe ), center->preview);
/*
* Resize the greater one of dwidth and dheight to PREVIEW_SIZE
*/
if ( center->dwidth > center->dheight )
{
center->pheight = center->dheight * PREVIEW_SIZE / center->dwidth;
center->pwidth = PREVIEW_SIZE;
}
else
{
center->pwidth = center->dwidth * PREVIEW_SIZE / center->dheight;
center->pheight = PREVIEW_SIZE;
}
gtk_preview_size (GTK_PREVIEW (preview), center->pwidth, center->pheight);
/* Draw the contents of preview, that is saved in the preview widget */
flare_center_preview_init (center);
gtk_container_add (GTK_CONTAINER (pframe ), preview);
gtk_widget_show (preview);
gtk_widget_show (pframe);
gtk_widget_show (table);
gtk_object_set_user_data (GTK_OBJECT (frame), center);
gtk_widget_show (frame);
flare_center_cursor_update (center);
center->cursor = FALSE; /* Make sure that the cursor has not been drawn */
center->in_call = FALSE; /* End of initialization */
FlareFX(drawable, 1);
DEBUG1 ("fvals center=%d,%d\n", fvals.posx, fvals.posy);
DEBUG1 ("center cur=%d,%d\n", center->curx, center->cury);
return frame;
}
@ -811,134 +879,129 @@ flare_center_destroy (GtkWidget *widget,
g_free (center);
}
static void
render_preview (GtkWidget *preview,
GPixelRgn *srcrgn);
/*
* Initialize preview
* Draw the contents into the internal buffer of the preview widget
*/
static void
flare_center_preview_init (FlareCenter *center)
static GtkWidget *
preview_widget (GDrawable *drawable)
{
GtkWidget *preview;
GPixelRgn src_rgn;
gint dwidth, dheight, pwidth, pheight, bpp;
gint size;
preview = center->preview;
dwidth = center->dwidth;
dheight = center->dheight;
pwidth = center->pwidth;
pheight = center->pheight;
bpp = center->bpp;
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
fill_preview_with_thumb (preview, drawable->id);
size = (GTK_PREVIEW (preview)->buffer_width) *
(GTK_PREVIEW (preview)->buffer_height) *
(GTK_PREVIEW (preview)->bpp);
preview_bits = g_malloc (size);
memcpy (preview_bits, GTK_PREVIEW (preview)->buffer, size);
gimp_pixel_rgn_init (&src_rgn, center->drawable, 0, 0,
center->dwidth, center->dheight, FALSE, FALSE);
render_preview (center->preview, &src_rgn);
return preview;
}
/*======================================================================
Preview Rendering Util routine
=======================================================================*/
#define CHECKWIDTH 4
#define LIGHTCHECK 192
#define DARKCHECK 128
#ifndef OPAQUE
#define OPAQUE 255
#endif
static void
render_preview (GtkWidget *preview,
GPixelRgn *srcrgn)
fill_preview_with_thumb (GtkWidget *widget,
gint32 drawable_ID)
{
guchar *src_row, *dest_row, *src, *dest;
gint row, col;
gint dwidth, dheight, pwidth, pheight;
gint *src_col;
gint bpp, alpha, has_alpha, b;
guchar check;
guchar *drawable_data;
gint bpp;
gint x,y;
gint width = 128;
gint height = 128;
gint realwidth;
guchar *src;
gdouble r, g, b, a;
gdouble c0, c1;
guchar *p0, *p1,*even,*odd;
dwidth = srcrgn->w;
dheight = srcrgn->h;
if (GTK_PREVIEW (preview)->buffer)
bpp = 0; /* Only returned */
drawable_data =
gimp_drawable_get_thumbnail_data (drawable_ID, &width, &height, &bpp);
realwidth = width;
if (width % 2)
width = width - 1;
if ((width / 2) % 2)
width = width - 2;
gtk_preview_size (GTK_PREVIEW (widget), width, height);
even = g_malloc (width * 3);
odd = g_malloc (width * 3);
src = drawable_data;
for (y = 0; y < height; y++)
{
pwidth = GTK_PREVIEW (preview)->buffer_width;
pheight = GTK_PREVIEW (preview)->buffer_height;
}
else
{
pwidth = preview->requisition.width;
pheight = preview->requisition.height;
}
bpp = srcrgn->bpp;
alpha = bpp;
has_alpha = gimp_drawable_has_alpha (srcrgn->drawable->id);
if (has_alpha) alpha--;
/* printf("render_preview: %d %d %d", bpp, alpha, has_alpha);
printf(" (%d %d %d %d)\n", dwidth, dheight, pwidth, pheight); */
src_row = g_new (guchar, dwidth * bpp);
dest_row = g_new (guchar, pwidth * bpp);
src_col = g_new (gint, pwidth);
for (col = 0; col < pwidth; col++)
src_col[ col ] = (col * dwidth / pwidth) * bpp;
for (row = 0; row < pheight; row++)
{
gimp_pixel_rgn_get_row (srcrgn, src_row,
0, row * dheight / pheight, dwidth);
dest = dest_row;
for (col = 0; col < pwidth; col++)
p0 = even;
p1 = odd;
for (x = 0; x < width; x++)
{
src = &src_row[ src_col[col] ];
if (!has_alpha || src[alpha] == OPAQUE)
if (bpp == 4)
{
/* no alpha channel or opaque -- simple way */
for ( b = 0; b < alpha; b++ )
dest[b] = src[b];
r = ((gdouble)src[x*4+0]) / 255.0;
g = ((gdouble)src[x*4+1]) / 255.0;
b = ((gdouble)src[x*4+2]) / 255.0;
a = ((gdouble)src[x*4+3]) / 255.0;
}
else
else if (bpp == 3)
{
/* more or less transparent */
if ((col % (CHECKWIDTH*2) < CHECKWIDTH) ^
(row % (CHECKWIDTH*2) < CHECKWIDTH))
check = LIGHTCHECK;
else
check = DARKCHECK;
if (src[alpha] == 0)
{
/* full transparent -- check */
for (b = 0; b < alpha; b++)
dest[b] = check;
}
else
{
/* middlemost transparent -- mix check and src */
for (b = 0; b < alpha; b++)
dest[b] = (src[b]*src[alpha] + check*(OPAQUE-src[alpha])) / OPAQUE;
}
r = ((gdouble)src[x*3+0]) / 255.0;
g = ((gdouble)src[x*3+1]) / 255.0;
b = ((gdouble)src[x*3+2]) / 255.0;
a = 1.0;
}
dest += alpha;
else
{
r = ((gdouble)src[x*bpp+0]) / 255.0;
g = b = r;
if(bpp == 2)
a = ((gdouble)src[x*bpp+1]) / 255.0;
else
a = 1.0;
}
if ((x / GIMP_CHECK_SIZE_SM) & 1)
{
c0 = GIMP_CHECK_LIGHT;
c1 = GIMP_CHECK_DARK;
}
else
{
c0 = GIMP_CHECK_DARK;
c1 = GIMP_CHECK_LIGHT;
}
*p0++ = (c0 + (r - c0) * a) * 255.0;
*p0++ = (c0 + (g - c0) * a) * 255.0;
*p0++ = (c0 + (b - c0) * a) * 255.0;
*p1++ = (c1 + (r - c1) * a) * 255.0;
*p1++ = (c1 + (g - c1) * a) * 255.0;
*p1++ = (c1 + (b - c1) * a) * 255.0;
} /* for */
if ((y / GIMP_CHECK_SIZE_SM) & 1)
{
gtk_preview_draw_row (GTK_PREVIEW (widget), (guchar *)odd, 0, y, width);
}
gtk_preview_draw_row (GTK_PREVIEW (preview), dest_row,
0, row, pwidth);
else
{
gtk_preview_draw_row (GTK_PREVIEW (widget), (guchar *)even, 0, y, width);
}
src += realwidth * bpp;
}
g_free (src_col);
g_free (src_row);
g_free (dest_row);
g_free (even);
g_free (odd);
g_free (drawable_data);
}
/*======================================================================
Preview Rendering Util routine End
=======================================================================*/
/*
* Drawing CenterFrame
* if update & PREVIEW, draw preview
@ -960,27 +1023,41 @@ flare_center_draw (FlareCenter *center,
DEBUG1 ("draw-cursor %d old=%d,%d cur=%d,%d\n",
center->cursor,
center->oldx, center->oldy, center->curx, center->cury);
gdk_gc_set_function (center->preview->style->black_gc, GDK_INVERT);
if (center->cursor)
gdk_gc_set_function (preview->style->black_gc, GDK_INVERT);
if (show_cursor)
{
gdk_draw_line (center->preview->window,
center->preview->style->black_gc,
center->oldx, 1, center->oldx, center->pheight-1);
gdk_draw_line (center->preview->window,
center->preview->style->black_gc,
1, center->oldy, center->pwidth-1, center->oldy);
if (center->cursor)
{
gdk_draw_line (preview->window,
preview->style->black_gc,
center->oldx, 1,
center->oldx,
GTK_PREVIEW (preview)->buffer_height - 1);
gdk_draw_line (preview->window,
preview->style->black_gc,
1, center->oldy,
GTK_PREVIEW (preview)->buffer_width - 1,
center->oldy);
}
gdk_draw_line (preview->window,
preview->style->black_gc,
center->curx, 1,
center->curx,
GTK_PREVIEW (preview)->buffer_height - 1);
gdk_draw_line (preview->window,
preview->style->black_gc,
1, center->cury,
GTK_PREVIEW (preview)->buffer_width - 1,
center->cury);
}
gdk_draw_line (center->preview->window,
center->preview->style->black_gc,
center->curx, 1, center->curx, center->pheight-1);
gdk_draw_line (center->preview->window,
center->preview->style->black_gc,
1, center->cury, center->pwidth-1, center->cury);
/* current position of cursor is updated */
center->oldx = center->curx;
center->oldy = center->cury;
center->cursor = TRUE;
gdk_gc_set_function (center->preview->style->black_gc, GDK_COPY);
gdk_gc_set_function (preview->style->black_gc, GDK_COPY);
}
}
@ -1003,25 +1080,32 @@ flare_center_adjustment_update (GtkAdjustment *adjustment,
{
flare_center_cursor_update (center);
flare_center_draw (center, CURSOR);
FlareFX(center->drawable, 1);
}
}
/*
* Update the cross cursor's coordinates accoding to pvals.[xy]center
* Update the cross cursor's coordinates accoding to pvals.[xy]center
* but not redraw it
*/
static void
flare_center_cursor_update (FlareCenter *center)
{
center->curx = fvals.posx * center->pwidth / center->dwidth;
center->cury = fvals.posy * center->pheight / center->dheight;
center->curx =
fvals.posx * GTK_PREVIEW (preview)->buffer_width / center->dwidth;
center->cury =
fvals.posy * GTK_PREVIEW (preview)->buffer_height / center->dheight;
if ( center->curx < 0) center->curx = 0;
else if (center->curx >= center->pwidth) center->curx = center->pwidth-1;
if (center->cury < 0) center->cury = 0;
else if (center->cury >= center->pheight) center->cury = center->pheight-1;
if ( center->curx < 0)
center->curx = 0;
else if (center->curx >= GTK_PREVIEW (preview)->buffer_width)
center->curx = GTK_PREVIEW (preview)->buffer_width - 1;
if (center->cury < 0)
center->cury = 0;
else if (center->cury >= GTK_PREVIEW (preview)->buffer_height)
center->cury = GTK_PREVIEW (preview)->buffer_height - 1;
}
/*
@ -1066,7 +1150,8 @@ flare_center_preview_events (GtkWidget *widget,
case GDK_MOTION_NOTIFY:
mevent = (GdkEventMotion *) event;
if (!mevent->state) break;
if (!mevent->state)
break;
center->curx = mevent->x;
center->cury = mevent->y;
mouse:
@ -1074,11 +1159,12 @@ flare_center_preview_events (GtkWidget *widget,
center->in_call = TRUE;
gtk_adjustment_set_value (GTK_ADJUSTMENT (center->xadj),
center->curx * center->dwidth /
center->pwidth);
GTK_PREVIEW (preview)->buffer_width);
gtk_adjustment_set_value (GTK_ADJUSTMENT (center->yadj),
center->cury * center->dheight /
center->pheight);
GTK_PREVIEW (preview)->buffer_height);
center->in_call = FALSE;
FlareFX(center->drawable, 1);
break;
default:

View File

@ -1,3 +1,7 @@
2000-05-22 Sven Neumann <sven@gimp.org>
* de.po: updated german translation
Mon May 22 11:54:43 CEST 2000 Stanislav Brabec <utx@penguin.cz>
* cs.po: Updated translation.

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gimp-perl\n"
"POT-Creation-Date: 1999-09-12 17:58+0200\n"
"PO-Revision-Date: 2000-05-08 15:53+02:00\n"
"PO-Revision-Date: 2000-05-22 19:19+02:00\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@ -326,9 +326,8 @@ msgstr "Funktion oder Macro \"$name\" existiert nicht in $class"
msgid "accepted tcp connection from "
msgstr "TCP-Verbindung angenommen von "
#, fuzzy
msgid "<Toolbox>/Xtns/Render/Pixelgenerator..."
msgstr "<Toolbox>/Xtns/Render/Pixelgenerator"
msgstr "<Toolbox>/Xtns/Render/Pixelgenerator..."
msgid "illegal parasite specification, expected three array members"
msgstr "Ungültige Parasiten-Spezifikation; erwarte drei Feldelemente"
@ -571,9 +570,8 @@ msgstr "-*-courier-medium-r-normal--*-120-*-*-*-*-*"
msgid "Synopsis"
msgstr "Synopsis"
#, fuzzy
msgid "<Image>/Filters/Map/Pixelmap..."
msgstr "<Image>/Filter/Abbilden/Pixelabbildung"
msgstr "<Image>/Filter/Abbilden/Pixelabbildung..."
msgid "Color"
msgstr "Farbe"
@ -747,7 +745,7 @@ msgid "<Toolbox>/Xtns/Visual Scriptor"
msgstr "<Toolbox>/Xtns/Visual Scriptor"
msgid "<Image>/Filters/Noise/Xach Vision..."
msgstr "<Image>/Filter/Rauschen/Xachs Sicht..."
msgstr "<Image>/Filter/Rauschen/Xachs Vision..."
msgid "WARNING: client disconnected while holding an active lock\n"
msgstr "WARNING: Verbindung zum Client wurde getrennt während ein lock aktiv war\n"
@ -891,9 +889,8 @@ msgid ""
msgstr ""
"$function: $AUTOLOAD sollte nicht ohne den :auto import tag aufgerufen werden!\n"
#, fuzzy
msgid "<Image>/Filters/Enhance/Warp Sharp..."
msgstr "<Image>/Filter/Abbilden/Xach-Schatten..."
msgstr "<Image>/Filter/Verbessern/Warp Schärfen..."
msgid "unable to open Gimp::Net communications socket: $!\n"
msgstr "Konnte den Gimp::Net Kommunikationskanal nicht öffnen: $!\n"

View File

@ -1,3 +1,7 @@
2000-05-22 Sven Neumann <sven@gimp.org>
* de.po: updated german translation
Mon May 22 11:55:42 CEST 2000 Stanislav Brabec <utx@penguin.cz>
* cs.po: Updated translation.

View File

@ -7,9 +7,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: GIMP 1.1.21\n"
"Project-Id-Version: GIMP 1.1.22\n"
"POT-Creation-Date: 2000-05-14 13:42-0700\n"
"PO-Revision-Date: 2000-05-11 18:28+02:00\n"
"PO-Revision-Date: 2000-05-22 19:21+02:00\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@ -8888,7 +8888,7 @@ msgstr "Keyframes zur
#: plug-ins/gap/gap_mov_dialog.c:2743
msgid "Move Path Controlpointcheck"
msgstr ""
msgstr "Bewegungs-Pfad Kontrollpunkt-Check"
#: plug-ins/gap/gap_mov_dialog.c:2744
msgid "Errors:"

View File

@ -1,3 +1,7 @@
2000-05-22 Sven Neumann <sven@gimp.org>
* de.po: updated german translation
Mon May 22 11:55:03 CEST 2000 Stanislav Brabec <utx@penguin.cz>
* cs.po: Updated translation.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GIMP 1.1.22\n"
"POT-Creation-Date: 2000-05-17 17:20+0200\n"
"PO-Revision-Date: 2000-05-17 17:45+02:00\n"
"PO-Revision-Date: 2000-05-22 18:22+02:00\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@ -35,7 +35,7 @@ msgstr "Mehr Informationen finden Sie auf http://www.gimp.org/"
#: app/airbrush.c:141 app/convolve.c:154 app/smudge.c:117
msgid "Rate:"
msgstr "Geschwindigkeit:"
msgstr "Rate:"
#: app/airbrush.c:154 modules/colorsel_water.c:691
msgid "Pressure:"