mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 19:43:01 +00:00
Correctly initialize the max arrays in thin_region. Fixes bug #8351 return
* app/paint_funcs.c: Correctly initialize the max arrays in thin_region. Fixes bug #8351 * app/scale.c: return from the channel_scale function if we tried to zoom in/out too far. This prevents some unnecessary display redraws.
This commit is contained in:
parent
b6b59debdd
commit
ce4234b2a6
|
@ -1,3 +1,11 @@
|
|||
2000-04-28 Jay Cox <jaycox@earthlink.net>
|
||||
|
||||
* app/paint_funcs.c: Correctly initialize the max arrays in
|
||||
thin_region. Fixes bug #8351
|
||||
* app/scale.c: return from the channel_scale function if we
|
||||
tried to zoom in/out too far. This prevents some
|
||||
unnecessary display redraws.
|
||||
|
||||
2000-04-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/print/print-util.c: do not use error_t, some systems
|
||||
|
|
|
@ -113,6 +113,8 @@ change_scale (GDisplay *gdisp,
|
|||
else
|
||||
if (scaledest < 0x10)
|
||||
scaledest++;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
|
||||
case ZOOMOUT :
|
||||
|
@ -121,6 +123,8 @@ change_scale (GDisplay *gdisp,
|
|||
else
|
||||
if (scalesrc < 0x10)
|
||||
scalesrc++;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
|
||||
default :
|
||||
|
|
|
@ -113,6 +113,8 @@ change_scale (GDisplay *gdisp,
|
|||
else
|
||||
if (scaledest < 0x10)
|
||||
scaledest++;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
|
||||
case ZOOMOUT :
|
||||
|
@ -121,6 +123,8 @@ change_scale (GDisplay *gdisp,
|
|||
else
|
||||
if (scalesrc < 0x10)
|
||||
scalesrc++;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
|
||||
default :
|
||||
|
|
|
@ -4691,6 +4691,10 @@ thin_region(PixelRegion *src, gint16 xradius, gint16 yradius, int edge_lock)
|
|||
buf[i] = (guchar *)g_malloc (src->w * sizeof(guchar));
|
||||
}
|
||||
buffer = g_malloc ((src->w+2*xradius + 1)*(yradius+1));
|
||||
if (edge_lock)
|
||||
memset(buffer, 255, (src->w+2*xradius + 1)*(yradius+1));
|
||||
else
|
||||
memset(buffer, 0, (src->w+2*xradius + 1)*(yradius+1));
|
||||
for (i = 0; i < src->w+2*xradius; i++)
|
||||
{
|
||||
if (i < xradius)
|
||||
|
@ -4705,8 +4709,6 @@ thin_region(PixelRegion *src, gint16 xradius, gint16 yradius, int edge_lock)
|
|||
max[i] = &buffer[(yradius+1)*(src->w + xradius - 1)];
|
||||
else
|
||||
max[i] = &buffer[(yradius+1)*(src->w + xradius)];
|
||||
for (j = 0 ; j < xradius+1; j++)
|
||||
max[i][j] = 255;
|
||||
}
|
||||
if (!edge_lock)
|
||||
for (j = 0 ; j < xradius+1; j++)
|
||||
|
@ -4723,7 +4725,7 @@ thin_region(PixelRegion *src, gint16 xradius, gint16 yradius, int edge_lock)
|
|||
if (edge_lock)
|
||||
memcpy (buf[0], buf[1], src->w);
|
||||
else
|
||||
memset(buf[0], 0, src->w);
|
||||
memset (buf[0], 0, src->w);
|
||||
for (x = 0; x < src->w; x++) /* set up max for top of image */
|
||||
{
|
||||
max[x][0] = buf[0][x];
|
||||
|
|
|
@ -4691,6 +4691,10 @@ thin_region(PixelRegion *src, gint16 xradius, gint16 yradius, int edge_lock)
|
|||
buf[i] = (guchar *)g_malloc (src->w * sizeof(guchar));
|
||||
}
|
||||
buffer = g_malloc ((src->w+2*xradius + 1)*(yradius+1));
|
||||
if (edge_lock)
|
||||
memset(buffer, 255, (src->w+2*xradius + 1)*(yradius+1));
|
||||
else
|
||||
memset(buffer, 0, (src->w+2*xradius + 1)*(yradius+1));
|
||||
for (i = 0; i < src->w+2*xradius; i++)
|
||||
{
|
||||
if (i < xradius)
|
||||
|
@ -4705,8 +4709,6 @@ thin_region(PixelRegion *src, gint16 xradius, gint16 yradius, int edge_lock)
|
|||
max[i] = &buffer[(yradius+1)*(src->w + xradius - 1)];
|
||||
else
|
||||
max[i] = &buffer[(yradius+1)*(src->w + xradius)];
|
||||
for (j = 0 ; j < xradius+1; j++)
|
||||
max[i][j] = 255;
|
||||
}
|
||||
if (!edge_lock)
|
||||
for (j = 0 ; j < xradius+1; j++)
|
||||
|
@ -4723,7 +4725,7 @@ thin_region(PixelRegion *src, gint16 xradius, gint16 yradius, int edge_lock)
|
|||
if (edge_lock)
|
||||
memcpy (buf[0], buf[1], src->w);
|
||||
else
|
||||
memset(buf[0], 0, src->w);
|
||||
memset (buf[0], 0, src->w);
|
||||
for (x = 0; x < src->w; x++) /* set up max for top of image */
|
||||
{
|
||||
max[x][0] = buf[0][x];
|
||||
|
|
|
@ -113,6 +113,8 @@ change_scale (GDisplay *gdisp,
|
|||
else
|
||||
if (scaledest < 0x10)
|
||||
scaledest++;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
|
||||
case ZOOMOUT :
|
||||
|
@ -121,6 +123,8 @@ change_scale (GDisplay *gdisp,
|
|||
else
|
||||
if (scalesrc < 0x10)
|
||||
scalesrc++;
|
||||
else
|
||||
return;
|
||||
break;
|
||||
|
||||
default :
|
||||
|
|
Loading…
Reference in a new issue