summaryrefslogtreecommitdiff
path: root/gtk/gtkhsv.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-07-25 20:25:43 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-07-25 20:25:43 +0000
commitad476671c167f5529233d6a8bfffd58faf0282b4 (patch)
treecc0147e0805aa342b4ed3f40a8e97ddf6c62b090 /gtk/gtkhsv.c
parent8f35b79deda0ca549a0b3e47e26dd0c980e59e12 (diff)
downloadgdk-pixbuf-ad476671c167f5529233d6a8bfffd58faf0282b4.tar.gz
Pad out the full width, in an attempt to work around bug #311225.
2005-07-25 Matthias Clasen <mclasen@redhat.com> * gtk/gtkhsv.c (paint_triangle): Pad out the full width, in an attempt to work around bug #311225.
Diffstat (limited to 'gtk/gtkhsv.c')
-rw-r--r--gtk/gtkhsv.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c
index e8dbc19c5..e3ea34966 100644
--- a/gtk/gtkhsv.c
+++ b/gtk/gtkhsv.c
@@ -1097,7 +1097,7 @@ paint_triangle (GtkHSV *hsv,
gint x2, y2, r2, g2, b2; /* Second vertex */
gint x3, y3, r3, g3, b3; /* Third vertex */
gint t;
- guint32 *buf, *p;
+ guint32 *buf, *p, c;
gint xl, xr, rl, rr, gl, gr, bl, br; /* Scanline data */
gint xx, yy;
gint x_interp, y_interp;
@@ -1196,8 +1196,11 @@ paint_triangle (GtkHSV *hsv,
x_start = MAX (xl - PAD, x);
x_end = MIN (xr + PAD, x + width);
- p += (x_start - x);
+ c = (rl << 16) | (gl << 8) | bl;
+ for (xx = x; xx < x_start; xx++)
+ *p++ = c;
+
for (xx = x_start; xx < x_end; xx++)
{
x_interp = CLAMP (xx, xl, xr);
@@ -1206,6 +1209,11 @@ paint_triangle (GtkHSV *hsv,
(LERP (gl, gr, xl, xr, x_interp) << 8) |
LERP (bl, br, xl, xr, x_interp));
}
+
+ c = (rr << 16) | (gr << 8) | br;
+
+ for (xx = x_end; xx < x + width; xx++)
+ *p++ = c;
}
}