Author: spouliot
Date: 2008-02-06 13:53:04 -0500 (Wed, 06 Feb 2008)
New Revision: 95060
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/shape.cpp
trunk/moon/src/shape.h
trunk/moon/src/uielement.h
Log:
2008-02-06 Sebastien Pouliot <[EMAIL PROTECTED]>
* shape.cpp|h: Keep track if a rectangle has radii or not.
* uielement.h: Add a flag for radii
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2008-02-06 18:08:43 UTC (rev 95059)
+++ trunk/moon/src/ChangeLog 2008-02-06 18:53:04 UTC (rev 95060)
@@ -1,3 +1,8 @@
+2008-02-06 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * shape.cpp|h: Keep track if a rectangle has radii or not.
+ * uielement.h: Add a flag for radii
+
2008-02-06 Chris Toshok <[EMAIL PROTECTED]>
* uielement.cpp (UIElement::FrontToBack): make sure
Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp 2008-02-06 18:08:43 UTC (rev 95059)
+++ trunk/moon/src/shape.cpp 2008-02-06 18:53:04 UTC (rev 95060)
@@ -811,8 +811,8 @@
if (!SetupLine (cr))
return drawn;
- // FIXME: is it worth checking for round-corners ?
- SetupLineJoinMiter (cr);
+ if (!HasRadii ())
+ SetupLineJoinMiter (cr);
// Draw if the path wasn't drawn by the Fill call
if (!drawn)
@@ -961,6 +961,7 @@
shape:
// rounded-corner rectangle ?
if (round) {
+ AddShapeFlags (UIElement::SHAPE_RADII);
path = moon_path_renew (path,
MOON_PATH_ROUNDED_RECTANGLE_LENGTH);
moon_rounded_rectangle (path, x, y, w, h, radius_x, radius_y);
} else {
Modified: trunk/moon/src/shape.h
===================================================================
--- trunk/moon/src/shape.h 2008-02-06 18:08:43 UTC (rev 95059)
+++ trunk/moon/src/shape.h 2008-02-06 18:53:04 UTC (rev 95060)
@@ -107,7 +107,9 @@
bool IsEmpty () { return (flags & UIElement::SHAPE_EMPTY); };
bool IsNormal () { return (flags & UIElement::SHAPE_NORMAL); };
bool IsDegenerate () { return (flags & UIElement::SHAPE_DEGENERATE); };
+ bool HasRadii () { return (flags & UIElement::SHAPE_RADII); };
void SetShapeFlags (UIElementFlags sf) { flags &=
~UIElement::SHAPE_MASK; flags |= sf; };
+ void AddShapeFlags (UIElementFlags sf) { flags |= sf; };
};
Brush *shape_get_fill (Shape *shape);
Modified: trunk/moon/src/uielement.h
===================================================================
--- trunk/moon/src/uielement.h 2008-02-06 18:08:43 UTC (rev 95059)
+++ trunk/moon/src/uielement.h 2008-02-06 18:53:04 UTC (rev 95060)
@@ -69,7 +69,8 @@
SHAPE_EMPTY = 0x20, // there's is nothing to draw,
the cached path may be NULL
SHAPE_NORMAL = 0x40, // normal drawing
SHAPE_DEGENERATE = 0x80, // degenerate drawing, use the
Stroke brush for filling
- SHAPE_MASK = (SHAPE_EMPTY | SHAPE_NORMAL |
SHAPE_DEGENERATE)
+ SHAPE_RADII = 0x100,
+ SHAPE_MASK = (SHAPE_EMPTY | SHAPE_NORMAL |
SHAPE_DEGENERATE | SHAPE_RADII)
};
int flags;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches