Author: spouliot
Date: 2007-10-04 08:34:01 -0400 (Thu, 04 Oct 2007)
New Revision: 86871
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/shape.cpp
trunk/moon/src/shape.h
Log:
shape.cpp|h: Shapes that uses their Width and Height must use them for brush
size. Fix brush rendering when used with UIElement.RenderTransform property.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-10-04 12:32:59 UTC (rev 86870)
+++ trunk/moon/src/ChangeLog 2007-10-04 12:34:01 UTC (rev 86871)
@@ -1,3 +1,9 @@
+2007-10-04 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * shape.cpp|h: Shapes that uses their Width and Height must use
+ them for brush size. Fix brush rendering when used with
+ UIElement.RenderTransform property.
+
2007-10-03 Chris Toshok <[EMAIL PROTECTED]>
* text.cpp: make Glyphs usable even when text=pango. "usable"
Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp 2007-10-04 12:32:59 UTC (rev 86870)
+++ trunk/moon/src/shape.cpp 2007-10-04 12:34:01 UTC (rev 86871)
@@ -294,12 +294,8 @@
void
Shape::GetSizeForBrush (cairo_t *cr, double *width, double *height)
{
- double x1, y1, x2, y2;
-
- cairo_stroke_extents (cr, &x1, &y1, &x2, &y2);
-
- *height = fabs (y2 - y1);
- *width = fabs (x2 - x1);
+ *height = framework_element_get_height (this);
+ *width = framework_element_get_width (this);
}
bool
@@ -1318,6 +1314,17 @@
Invalidate ();
}
+void
+Polygon::GetSizeForBrush (cairo_t *cr, double *width, double *height)
+{
+ double x1, y1, x2, y2;
+
+ cairo_stroke_extents (cr, &x1, &y1, &x2, &y2);
+
+ *height = fabs (y2 - y1);
+ *width = fabs (x2 - x1);
+}
+
FillRule
polygon_get_fill_rule (Polygon *polygon)
{
@@ -1496,6 +1503,17 @@
Invalidate ();
}
+void
+Polyline::GetSizeForBrush (cairo_t *cr, double *width, double *height)
+{
+ double x1, y1, x2, y2;
+
+ cairo_stroke_extents (cr, &x1, &y1, &x2, &y2);
+
+ *height = fabs (y2 - y1);
+ *width = fabs (x2 - x1);
+}
+
FillRule
polyline_get_fill_rule (Polyline *polyline)
{
@@ -1634,6 +1652,17 @@
Shape::OnSubPropertyChanged (prop, subprop);
}
+void
+Path::GetSizeForBrush (cairo_t *cr, double *width, double *height)
+{
+ double x1, y1, x2, y2;
+
+ cairo_stroke_extents (cr, &x1, &y1, &x2, &y2);
+
+ *height = fabs (y2 - y1);
+ *width = fabs (x2 - x1);
+}
+
Geometry *
path_get_data (Path *path)
{
Modified: trunk/moon/src/shape.h
===================================================================
--- trunk/moon/src/shape.h 2007-10-04 12:32:59 UTC (rev 86870)
+++ trunk/moon/src/shape.h 2007-10-04 12:34:01 UTC (rev 86871)
@@ -211,6 +211,7 @@
virtual FillRule GetFillRule ();
virtual bool CanFill () { return true; }
+ virtual void GetSizeForBrush (cairo_t *cr, double *width, double
*height);
virtual void ComputeBounds ();
virtual void OnPropertyChanged (DependencyProperty *prop);
@@ -241,6 +242,7 @@
virtual void BuildPath ();
virtual bool CanFill () { return true; }
+ virtual void GetSizeForBrush (cairo_t *cr, double *width, double
*height);
virtual void ComputeBounds ();
virtual FillRule GetFillRule ();
@@ -272,6 +274,7 @@
virtual void Draw (cairo_t *cr);
+ virtual void GetSizeForBrush (cairo_t *cr, double *width, double
*height);
virtual void ComputeBounds ();
virtual bool CanFill () { return true; }
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches