Author: lewing
Date: 2007-11-20 09:22:22 -0500 (Tue, 20 Nov 2007)
New Revision: 89975
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/uielement.cpp
Log:
2007-11-19 Larry Ewing <[EMAIL PROTECTED]>
* uielement.cpp: setup the clip before push/pop group so that
we reduce the temp surface size.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-11-20 12:52:51 UTC (rev 89974)
+++ trunk/moon/src/ChangeLog 2007-11-20 14:22:22 UTC (rev 89975)
@@ -1,3 +1,8 @@
+2007-11-19 Larry Ewing <[EMAIL PROTECTED]>
+
+ * uielement.cpp: setup the clip before push/pop group so that
+ we reduce the temp surface size.
+
2007-11-16 Sebastien Pouliot <[EMAIL PROTECTED]>
* transform.cpp: Use cairo_matrix_init_translate instead of
Modified: trunk/moon/src/uielement.cpp
===================================================================
--- trunk/moon/src/uielement.cpp 2007-11-20 12:52:51 UTC (rev 89974)
+++ trunk/moon/src/uielement.cpp 2007-11-20 14:22:22 UTC (rev 89975)
@@ -106,6 +106,8 @@
void
UIElement::RenderClipPath (cairo_t *cr)
{
+ cairo_set_matrix (cr, &absolute_xform);
+
Value *value = GetValue (UIElement::ClipProperty);
if (!value)
return;
@@ -499,26 +501,26 @@
if (!GetVisible() || total_opacity == 0.0 || region->RectIn (bounds) ==
GDK_OVERLAP_RECTANGLE_OUT)
return;
+
STARTTIMER (UIElement_render, Type::Find (GetObjectType())->name);
if (opacityMask != NULL) {
cairo_save (cr);
+ cairo_identity_matrix (cr);
+ Rect clip = bounds;
+ clip.RoundOut ();
+ cairo_rectangle (cr, clip.x, clip.y, clip.w, clip.h);
+ RenderClipPath (cr);
opacityMask->SetupBrush (cr, this);
mask = cairo_get_source (cr);
cairo_pattern_reference (mask);
cairo_push_group (cr);
-
}
Render (cr, region);
if (opacityMask != NULL) {
cairo_pop_group_to_source (cr);
- cairo_set_matrix (cr, &absolute_xform);
- RenderClipPath (cr);
- cairo_identity_matrix (cr);
- cairo_rectangle (cr, bounds.x, bounds.y, bounds.w, bounds.h);
- cairo_clip (cr);
cairo_mask (cr, mask);
cairo_pattern_destroy (mask);
cairo_restore (cr);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches