Author: spouliot
Date: 2008-01-24 16:35:36 -0500 (Thu, 24 Jan 2008)
New Revision: 93843

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/shape.cpp
Log:
2008-01-24  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * shape.cpp: Avoid calls to cairo_in_[stroke|fill] if no stroke 
        (or fill) are present for the shape.



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2008-01-24 21:32:19 UTC (rev 93842)
+++ trunk/moon/src/ChangeLog    2008-01-24 21:35:36 UTC (rev 93843)
@@ -1,3 +1,8 @@
+2008-01-24  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * shape.cpp: Avoid calls to cairo_in_[stroke|fill] if no stroke 
+       (or fill) are present for the shape.
+
 2008-01-24  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
        * pipeline.cpp, pipeline.h: Create a more general worker thread, and use

Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp    2008-01-24 21:32:19 UTC (rev 93842)
+++ trunk/moon/src/shape.cpp    2008-01-24 21:35:36 UTC (rev 93843)
@@ -389,8 +389,6 @@
        if (!InsideClip (cr, x, y))
                return false;
 
-       bool ret = false;
-
        cairo_save (cr);
        // don't do the operation but do consider filling
        DoDraw (cr, false);
@@ -399,8 +397,8 @@
 
        uielement_transform_point (this, &nx ,&ny);
 
-       if (cairo_in_stroke (cr, nx, ny) || (CanFill () && cairo_in_fill (cr, 
nx, ny)))
-               ret = TRUE;
+       // don't check in_stroke without a stroke or in_fill without a fill 
(even if it can be filled)
+       bool ret = ((stroke && cairo_in_stroke (cr, nx, ny)) || (fill && 
CanFill () && cairo_in_fill (cr, nx, ny)));
        
        cairo_new_path (cr);
 

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

Reply via email to