]> Pileus Git - ~andy/gtk/commitdiff
Pad out the full width, in an attempt to work around bug #311225.
authorMatthias Clasen <mclasen@redhat.com>
Mon, 25 Jul 2005 20:25:43 +0000 (20:25 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 25 Jul 2005 20:25:43 +0000 (20:25 +0000)
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.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkhsv.c

index 03ed26a9e12cbb35796a206744316391903f0507..5786d2fe71824c8dc2d8b1f05fbe14fe84ff58c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 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. 
+
        * gtk/gtktreemodelsort.c: Trivial doc fixes.
 
        * gtk/gtktreesortable.c: Talk about comparison functions, not
index 03ed26a9e12cbb35796a206744316391903f0507..5786d2fe71824c8dc2d8b1f05fbe14fe84ff58c0 100644 (file)
@@ -1,5 +1,8 @@
 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. 
+
        * gtk/gtktreemodelsort.c: Trivial doc fixes.
 
        * gtk/gtktreesortable.c: Talk about comparison functions, not
index 03ed26a9e12cbb35796a206744316391903f0507..5786d2fe71824c8dc2d8b1f05fbe14fe84ff58c0 100644 (file)
@@ -1,5 +1,8 @@
 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. 
+
        * gtk/gtktreemodelsort.c: Trivial doc fixes.
 
        * gtk/gtktreesortable.c: Talk about comparison functions, not
index e8dbc19c59d63e142c7b17d860eef6420a84d070..e3ea34966294d9c1aa098d47daf2ab7fe92354b2 100644 (file)
@@ -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;
       }
     }