mirror of https://github.com/GNOME/gimp.git
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:
parent
c231c15089
commit
3ed86a7343
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue