• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSRect to carbon Rect conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSRect to carbon Rect conversion
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Messaging Nil
  • Next by Date: Re: Correctly Subclassing NSTableHeaderCell?
  • Previous by thread: Messaging Nil
  • Next by thread: Re: NSRect to carbon Rect conversion
  • Index(es):
    • Date
    • Thread