Author: stephane
Date: 2008-02-08 03:23:32 -0500 (Fri, 08 Feb 2008)
New Revision: 95223

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/brush.cpp
Log:
2008-02-08  Stephane Delcroix  <[EMAIL PROTECTED]>

        * brush.cpp: fix Image|Video|VisualBrushes for Shapes.


Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2008-02-08 07:59:30 UTC (rev 95222)
+++ trunk/moon/src/ChangeLog    2008-02-08 08:23:32 UTC (rev 95223)
@@ -1,3 +1,7 @@
+2008-02-08  Stephane Delcroix  <[EMAIL PROTECTED]>
+
+       * brush.cpp: fix Image|Video|VisualBrushes for Shapes.
+
 2008-02-07  Chris Toshok  <[EMAIL PROTECTED]>
 
        * media.cpp (MediaElement::Render): snap to the pixel grid if

Modified: trunk/moon/src/brush.cpp
===================================================================
--- trunk/moon/src/brush.cpp    2008-02-08 07:59:30 UTC (rev 95222)
+++ trunk/moon/src/brush.cpp    2008-02-08 08:23:32 UTC (rev 95223)
@@ -1007,6 +1007,8 @@
        cairo_pattern_t *pattern = cairo_pattern_create_for_surface (surface);
 
        image_brush_compute_pattern_matrix (&matrix, width, height, 
image->GetWidth (), image->GetHeight (), stretch, ax, ay, transform, 
relative_transform);
+       Point offset = uielement->GetOriginPoint ();
+       cairo_matrix_translate (&matrix, -offset.x, -offset.y);
        cairo_pattern_set_matrix (pattern, &matrix);
        
        cairo_set_source (cr, pattern);
@@ -1077,6 +1079,8 @@
        pattern = cairo_pattern_create_for_surface (surface);
 
        image_brush_compute_pattern_matrix (&matrix, width, height, 
mplayer->width, mplayer->height, stretch, ax, ay, transform, 
relative_transform);
+       Point offset = uielement->GetOriginPoint ();
+       cairo_matrix_translate (&matrix, -offset.x, -offset.y);
        cairo_pattern_set_matrix (pattern, &matrix);
        
        cairo_set_source (cr, pattern);
@@ -1198,6 +1202,8 @@
                                            (int)bounds.w, (int)bounds.h,
                                            stretch, ax, ay, transform, 
relative_transform);
 
+       Point offset = uielement->GetOriginPoint ();
+       cairo_matrix_translate (&matrix, -offset.x, -offset.y);
        cairo_pattern_set_matrix (pattern, &matrix);
 
        cairo_set_source (cr, pattern);

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

Reply via email to