Author: spouliot
Date: 2007-08-31 08:20:51 -0400 (Fri, 31 Aug 2007)
New Revision: 85098
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/shape.cpp
Log:
2007-08-31 Sebastien Pouliot <[EMAIL PROTECTED]>
* shape.cpp: Added a shortcut in Shape::ComputeBoundsFast when shapes
are known to be empty (UIElement::SHAPE_EMPTY).
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-08-31 11:51:04 UTC (rev 85097)
+++ trunk/moon/src/ChangeLog 2007-08-31 12:20:51 UTC (rev 85098)
@@ -1,3 +1,8 @@
+2007-08-31 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * shape.cpp: Added a shortcut in Shape::ComputeBoundsFast when shapes
+ are known to be empty (UIElement::SHAPE_EMPTY).
+
2007-08-31 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* shape.h, shape.cpp: Revert to the old CanFill method for shapes,
Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp 2007-08-31 11:51:04 UTC (rev 85097)
+++ trunk/moon/src/shape.cpp 2007-08-31 12:20:51 UTC (rev 85098)
@@ -323,15 +323,16 @@
Shape::ComputeBoundsFast ()
{
bounds = Rect (0,0,0,0);
+ if (IsEmpty ())
+ return;
- Stretch stretch = shape_get_stretch (this);
-
double w = framework_element_get_width (this);
double h = framework_element_get_height (this);
if ((w < 0.0) || (h < 0.0))
return;
+ Stretch stretch = shape_get_stretch (this);
switch (stretch) {
case StretchUniform:
w = h = (w < h) ? w : h;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches