fixed drawing of brushes that extend beyond the preview.
2004-08-30 Sven Neumann <sven@gimp.org> * libgimp/gimpbrushmenu.c (gimp_brush_select_preview_draw): fixed drawing of brushes that extend beyond the preview.
This commit is contained in:
parent
d1825782ea
commit
1901ac2ff3
2 changed files with 21 additions and 11 deletions
|
|
@ -1,7 +1,12 @@
|
|||
2004-08-30 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimpbrushmenu.c (gimp_brush_select_preview_draw): fixed
|
||||
drawing of brushes that extend beyond the preview.
|
||||
|
||||
2004-08-30 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimpvectortool.[ch] (gimp_vector_tool_status_set):
|
||||
avoid extensive use of strdup() and strcmp(). The strings are all
|
||||
avoid excessive use of strdup() and strcmp(). The strings are all
|
||||
constant anyway.
|
||||
|
||||
2004-08-30 Michael Natterer <mitch@gimp.org>
|
||||
|
|
@ -18,7 +23,7 @@
|
|||
|
||||
* app/plug-in/plug-in-progress.c
|
||||
* app/plug-in/plug-in-run.c
|
||||
* app/plug-in/plug-in.c: switch bach to real refcouting for
|
||||
* app/plug-in/plug-in.c: switch back to real refcounting for
|
||||
plug_in->progress (reopens bug #150194) and enabled the PDB
|
||||
progress code.
|
||||
|
||||
|
|
|
|||
|
|
@ -411,24 +411,27 @@ gimp_brush_select_preview_draw (GimpPreviewArea *area,
|
|||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
const guchar *mask_data)
|
||||
const guchar *mask_data,
|
||||
gint rowstride)
|
||||
{
|
||||
const guchar *src;
|
||||
guchar *dest;
|
||||
guchar *buf;
|
||||
guint pixels = width * height;
|
||||
gint i, j;
|
||||
|
||||
buf = g_new (guchar, pixels);
|
||||
buf = g_new (guchar, width * height);
|
||||
|
||||
src = mask_data;
|
||||
dest = buf;
|
||||
|
||||
while (pixels--)
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
*dest = 255 - *src;
|
||||
const guchar *s = src;
|
||||
|
||||
src++;
|
||||
dest++;
|
||||
for (i = 0; i < width; i++, s++, dest++)
|
||||
*dest = 255 - *s;
|
||||
|
||||
src += rowstride;
|
||||
}
|
||||
|
||||
gimp_preview_area_draw (area,
|
||||
|
|
@ -463,7 +466,9 @@ gimp_brush_select_preview_update (GtkWidget *preview,
|
|||
preview->allocation.height,
|
||||
0xFF, 0xFF, 0xFF);
|
||||
|
||||
gimp_brush_select_preview_draw (area, x, y, width, height, mask_data);
|
||||
gimp_brush_select_preview_draw (area,
|
||||
x, y, width, height,
|
||||
mask_data, brush_width);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -519,7 +524,7 @@ gimp_brush_select_popup_open (BrushSelect *brush_sel,
|
|||
/* Draw the brush */
|
||||
gimp_brush_select_preview_draw (GIMP_PREVIEW_AREA (preview),
|
||||
0, 0, brush_sel->width, brush_sel->height,
|
||||
brush_sel->mask_data);
|
||||
brush_sel->mask_data, brush_sel->width);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue