Author: fejj
Date: 2007-08-21 17:19:52 -0400 (Tue, 21 Aug 2007)
New Revision: 84590
Modified:
branches/moon-delayed-rendering/src/ChangeLog
branches/moon-delayed-rendering/src/media.cpp
Log:
2007-08-21 Jeffrey Stedfast <[EMAIL PROTECTED]>
* media.cpp (ComputeBounds): Use the FrameworkElement width/height
unless unspecified, only then should we use video width/height.
Modified: branches/moon-delayed-rendering/src/ChangeLog
===================================================================
--- branches/moon-delayed-rendering/src/ChangeLog 2007-08-21 21:13:54 UTC
(rev 84589)
+++ branches/moon-delayed-rendering/src/ChangeLog 2007-08-21 21:19:52 UTC
(rev 84590)
@@ -1,3 +1,8 @@
+2007-08-21 Jeffrey Stedfast <[EMAIL PROTECTED]>
+
+ * media.cpp (ComputeBounds): Use the FrameworkElement width/height
+ unless unspecified, only then should we use video width/height.
+
2007-08-21 Chris Toshok <[EMAIL PROTECTED]>
* uielement.cpp (DoRender): short-circuit rendering of uielements
Modified: branches/moon-delayed-rendering/src/media.cpp
===================================================================
--- branches/moon-delayed-rendering/src/media.cpp 2007-08-21 21:13:54 UTC
(rev 84589)
+++ branches/moon-delayed-rendering/src/media.cpp 2007-08-21 21:19:52 UTC
(rev 84590)
@@ -157,11 +157,17 @@
delete mplayer;
}
-void
MediaElement::ComputeBounds ()
{
- bounds = bounding_rect_for_transformed_rect (&absolute_xform,
- Rect
(0,0,mplayer->width,mplayer->height));
+ double h = framework_element_get_height (this);
+ double w = framework_element_get_width (this);
+
+ if (w == 0.0 && h == 0.0) {
+ h = (double) mplayer->height;
+ w = (double) mplayer->width;
+ }
+
+ bounds = bounding_rect_for_transformed_rect (&absolute_xform, Rect (0,
0, w, h));
bounds.GrowBy (1);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches