Author: lewing
Date: 2007-10-08 13:15:45 -0400 (Mon, 08 Oct 2007)
New Revision: 87110

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/runtime.cpp
Log:
2007-10-08  Larry Ewing  <[EMAIL PROTECTED]>

        * src/runtime.cpp: change previous logic to drop the alpha
        completely here until more testing can be done.


Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-10-08 16:56:09 UTC (rev 87109)
+++ trunk/moon/src/ChangeLog    2007-10-08 17:15:45 UTC (rev 87110)
@@ -1,5 +1,10 @@
 2007-10-08  Larry Ewing  <[EMAIL PROTECTED]>
 
+       * src/runtime.cpp: change previous logic to drop the alpha
+       completely here until more testing can be done.
+
+2007-10-08  Larry Ewing  <[EMAIL PROTECTED]>
+
        * src/runtime.cpp: draw the background color blended over white.
 
 2007-10-08  Larry Ewing  <[EMAIL PROTECTED]>

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2007-10-08 16:56:09 UTC (rev 87109)
+++ trunk/moon/src/runtime.cpp  2007-10-08 17:15:45 UTC (rev 87110)
@@ -768,16 +768,14 @@
                cairo_paint (ctx);
        }
        else if (s->background_color) {
-               // Here since we are not transparent we start with a white
-               // background and blend the specified background on top of
-               // it.  Alternatively we could let gtk fill the background
-               // but we need a test case first.
+               // FIXME dropping the alpha seems the closest to correct we
+               // have at the moment.
                cairo_set_operator (ctx, CAIRO_OPERATOR_SOURCE);
-               double base = 1.0 - s->background_color->a;
-               cairo_set_source_rgb (ctx,
-                                     base + s->background_color->r * 
s->background_color->a,
-                                     base + s->background_color->g * 
s->background_color->a,
-                                     base + s->background_color->b * 
s->background_color->a);
+               cairo_set_source_rgba (ctx,
+                                      s->background_color->r,
+                                      s->background_color->g,
+                                      s->background_color->b,
+                                      s->transparent ? s->background_color->a 
: 1.0);
                cairo_paint (ctx);
        }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to