Author: spouliot
Date: 2007-08-22 15:54:17 -0400 (Wed, 22 Aug 2007)
New Revision: 84655
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/shape.cpp
trunk/moon/src/shape.h
Log:
2007-08-22 Sebastien Pouliot <[EMAIL PROTECTED]>
* shape.cpp|h: Provide GetTransformOrigin on Shape and remove them
from Rectangle and Ellipse. Monotone requires that on Path and I can't
recall the reason I made this (while all the test cases I made still
work that way).
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-08-22 19:53:33 UTC (rev 84654)
+++ trunk/moon/src/ChangeLog 2007-08-22 19:54:17 UTC (rev 84655)
@@ -1,3 +1,10 @@
+2007-08-22 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * shape.cpp|h: Provide GetTransformOrigin on Shape and remove them
+ from Rectangle and Ellipse. Monotone requires that on Path and I can't
+ recall the reason I made this (while all the test cases I made still
+ work that way).
+
2007-08-22 Jeffrey Stedfast <[EMAIL PROTECTED]>
* media.cpp (advance_frame): Don't bother invalidating here, we'll
Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp 2007-08-22 19:53:33 UTC (rev 84654)
+++ trunk/moon/src/shape.cpp 2007-08-22 19:54:17 UTC (rev 84655)
@@ -376,6 +376,16 @@
FrameworkElement::OnSubPropertyChanged (prop, subprop);
}
+Point
+Shape::GetTransformOrigin ()
+{
+ Point user_xform_origin = GetRenderTransformOrigin ();
+
+ return Point (framework_element_get_width (this) * user_xform_origin.x,
+ framework_element_get_height (this) * user_xform_origin.y);
+}
+
+
Brush *
shape_get_fill (Shape *shape)
{
@@ -565,15 +575,6 @@
moon_ellipse (cr, 0, 0, w, h);
}
-Point
-Ellipse::GetTransformOrigin ()
-{
- Point user_xform_origin = GetRenderTransformOrigin ();
-
- return Point (framework_element_get_width (this) * user_xform_origin.x,
- framework_element_get_height (this) * user_xform_origin.y);
-}
-
Ellipse *
ellipse_new (void)
{
@@ -642,15 +643,6 @@
cairo_close_path (cr);
}
-Point
-Rectangle::GetTransformOrigin ()
-{
- Point user_xform_origin = GetRenderTransformOrigin ();
-
- return Point (framework_element_get_width (this) * user_xform_origin.x,
- framework_element_get_height (this) * user_xform_origin.y);
-}
-
void
Rectangle::OnPropertyChanged (DependencyProperty *prop)
{
Modified: trunk/moon/src/shape.h
===================================================================
--- trunk/moon/src/shape.h 2007-08-22 19:53:33 UTC (rev 84654)
+++ trunk/moon/src/shape.h 2007-08-22 19:54:17 UTC (rev 84655)
@@ -63,6 +63,7 @@
virtual void GetSizeForBrush (cairo_t *cr, double *width, double
*height);
virtual void ComputeBounds ();
virtual bool InsideObject (cairo_t *cr, double x, double y);
+ virtual Point GetTransformOrigin ();
//
// new virtual methods for shapes
@@ -115,8 +116,6 @@
Ellipse ();
virtual Type::Kind GetObjectType () { return Type::ELLIPSE; };
- virtual Point GetTransformOrigin ();
-
void Draw (cairo_t *cr);
};
@@ -136,8 +135,6 @@
void Draw (cairo_t *cr);
- virtual Point GetTransformOrigin ();
-
virtual void OnPropertyChanged (DependencyProperty *prop);
};
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches