Author: spouliot
Date: 2007-06-22 08:44:38 -0400 (Fri, 22 Jun 2007)
New Revision: 80550
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/shape.cpp
Log:
2007-06-22 Sebastien Pouliot <[EMAIL PROTECTED]>
* shape.cpp: Small hack to avoid calling Draw 2 times during render.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-06-22 12:43:43 UTC (rev 80549)
+++ trunk/moon/src/ChangeLog 2007-06-22 12:44:38 UTC (rev 80550)
@@ -1,3 +1,7 @@
+2007-06-22 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * shape.cpp: Small hack to avoid calling Draw 2 times during render.
+
2007-06-22 Chris Toshok <[EMAIL PROTECTED]>
* value.cpp (Value): the copy ctor is definitely corrupting memory
Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp 2007-06-22 12:43:43 UTC (rev 80549)
+++ trunk/moon/src/shape.cpp 2007-06-22 12:44:38 UTC (rev 80550)
@@ -176,15 +176,17 @@
// absolute_xform.x0,
// absolute_xform.y0);
+ bool drawn = false;
// getting bounds, using cairo_stroke_extents, doesn't requires us to
fill (consider_fill)
// unless there is no stroke brush assigned, which requires us to fill
and use cairo_fill_extents
// also not every shapes can be filled, e.g. polylines, CallFill
if ((consider_fill || !stroke) && CanFill ()) {
if (fill) {
Draw (s);
+ drawn = true;
if (do_op) {
fill->SetupBrush (s->cairo, this);
- cairo_fill (s->cairo);
+ cairo_fill_preserve (s->cairo);
}
}
}
@@ -218,7 +220,8 @@
}
cairo_set_line_cap (s->cairo, convert_line_cap (cap));
- Draw (s);
+ if (!drawn)
+ Draw (s);
if (do_op) {
stroke->SetupBrush (s->cairo, this);
cairo_stroke (s->cairo);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches