app/paint_core.c

Tue Jun 27 22:26:30 BST 2000 Andy Thomas <alt@gimp.org>

	* app/paint_core.c

	Fixed problem with coloured brushes/grayscale images and painting
	close to the edge. Fixes bug #14159
This commit is contained in:
BST 2000 Andy Thomas 2000-06-27 21:26:59 +00:00 committed by Andy Thomas
parent c231c15089
commit 3ed86a7343
3 changed files with 17 additions and 14 deletions

View File

@ -1,3 +1,10 @@
Tue Jun 27 22:26:30 BST 2000 Andy Thomas <alt@gimp.org>
* app/paint_core.c
Fixed problem with coloured brushes/grayscale images and painting
close to the edge. Fixes bug #14159
2000-06-27 Sven Neumann <sven@gimp.org>
* plug-ins/helpbrowser/helpbrowser.c: simplified the

View File

@ -2065,7 +2065,7 @@ paint_line_pixmap_mask (GimpImage *dest,
gdouble alpha;
gdouble factor = 0.00392156986; /* 1.0 / 255.0 */
gint x_index;
gint i;
gint i,byte_loop;
/* Make sure x, y are positive */
while (x < 0)
@ -2093,12 +2093,10 @@ paint_line_pixmap_mask (GimpImage *dest,
/* maybe we could do this at tool creation or brush switch time? */
/* and compute it for the whole brush at once and cache it? */
alpha = d[bytes-1] * factor;
if (alpha)
{
d[0] *= alpha;
d[1] *= alpha;
d[2] *= alpha;
}
if(alpha)
for (byte_loop = 0; byte_loop < bytes - 1; byte_loop++)
d[byte_loop] *= alpha;
/* printf("i: %i d->r: %i d->g: %i d->b: %i d->a: %i\n",i,(int)d[0], (int)d[1], (int)d[2], (int)d[3]); */
gimage_transform_color (dest, drawable, p, d, RGB);
d += bytes;

View File

@ -2065,7 +2065,7 @@ paint_line_pixmap_mask (GimpImage *dest,
gdouble alpha;
gdouble factor = 0.00392156986; /* 1.0 / 255.0 */
gint x_index;
gint i;
gint i,byte_loop;
/* Make sure x, y are positive */
while (x < 0)
@ -2093,12 +2093,10 @@ paint_line_pixmap_mask (GimpImage *dest,
/* maybe we could do this at tool creation or brush switch time? */
/* and compute it for the whole brush at once and cache it? */
alpha = d[bytes-1] * factor;
if (alpha)
{
d[0] *= alpha;
d[1] *= alpha;
d[2] *= alpha;
}
if(alpha)
for (byte_loop = 0; byte_loop < bytes - 1; byte_loop++)
d[byte_loop] *= alpha;
/* printf("i: %i d->r: %i d->g: %i d->b: %i d->a: %i\n",i,(int)d[0], (int)d[1], (int)d[2], (int)d[3]); */
gimage_transform_color (dest, drawable, p, d, RGB);
d += bytes;