Author: mdk
Date: 2008-02-20 09:35:36 -0500 (Wed, 20 Feb 2008)
New Revision: 96253

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/shape.cpp
Log:
2008-02-20  Michael Dominic K.  <[EMAIL PROTECTED]>

        * src/shape.cpp: Fixing the shape caching to work also with 
Path/Geometry.
        Fixes: #362021.


Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2008-02-20 14:34:36 UTC (rev 96252)
+++ trunk/moon/src/ChangeLog    2008-02-20 14:35:36 UTC (rev 96253)
@@ -1,3 +1,8 @@
+2008-02-20  Michael Dominic K.  <[EMAIL PROTECTED]>
+
+       * src/shape.cpp: Fixing the shape caching to work also with 
Path/Geometry.
+       Fixes: #362021.
+
 2008-02-20  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
        * media.cpp: MediaElement/Image: Remove event handlers when we abort the

Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp    2008-02-20 14:34:36 UTC (rev 96252)
+++ trunk/moon/src/shape.cpp    2008-02-20 14:35:36 UTC (rev 96253)
@@ -321,18 +321,21 @@
                        return;
        } else {
                if (cached_surface == NULL && IsCandidateForCaching ()) {
-                       w = extents.w + extents.x;
-                       h = extents.h + extents.y;
-                       w = MAX (w, 1);
-                       h = MAX (h, 1);
+                       w = extents.w;
+                       h = extents.h;
+                       w = MAX (w, 1) + 2;
+                       h = MAX (h, 1) + 2;
 
                        cached_surface = image_brush_create_similar (cr, w, h);
                        cached_cr = cairo_create (cached_surface);
+                       cairo_translate (cached_cr, (int) - extents.x + 1, 
(int) - extents.y + 1);
                        ret = DrawShape (cached_cr, do_op);
                        cairo_destroy (cached_cr);
                }
 
                cairo_set_matrix (cr, &absolute_xform);
+               if (cached_surface)
+                       cairo_translate (cr, (int) extents.x - 1, (int) 
extents.y - 1);
                Clip (cr);
 
                if (cached_surface) {

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

Reply via email to