NSRect to carbon Rect conversion
NSRect to carbon Rect conversion
- Subject: NSRect to carbon Rect conversion
- From: Cormac Daly <email@hidden>
- Date: Thu, 3 Jan 2008 17:04:03 +0000
Hi,
My application uses a quicktime movie (QTMovieView) contained within
an NSView within an NSWindow. We are trying to echo this movie to a
video output device. The movie is displayed correctly on the video
output device but incorrectly on the main monitor.
I get the co-ordinates of the movie view as an NSRect and convert
these to a Rect, see below, so I can use the SetMovieBox() method.
However there seems to be a problem in converting from NSRect co-
ordinates to Rect co-ordinates. The movie co-ordinates do not match
the movie view co-ordinates after the following conversion:
Rect theMovieFrame;
NSRect i_MovieFrame;
...
theMovieFrame.top = 15;
theMovieFrame.left = 100;
theMovieFrame.bottom = (short)i_MovieFrame.size.height;
theMovieFrame.right = (short)i_MovieFrame.size.width;
The movie view values obtained are as follows - {x = 0, y = 0, w =
643, h = 381} but the following values {t = 15, l = 100, b = 396 , r
= 577} are the ones which SetMovieBox needs to display the movie
correctly.
The following screenshot demonstrates the problem:
http://img167.imageshack.us/my.php?image=picture1jl4.png
Any help would be greatly appreciated!
Thanks,
Cormac
--
Cormac Daly
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden