• 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
Re: NSRect to carbon Rect conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRect to carbon Rect conversion


  • Subject: Re: NSRect to carbon Rect conversion
  • From: "Shawn Erickson" <email@hidden>
  • Date: Thu, 3 Jan 2008 09:50:22 -0800

On Jan 3, 2008 9:04 AM, Cormac Daly <email@hidden> wrote:

> theMovieFrame.top = 15;
> theMovieFrame.left = 100;
> theMovieFrame.bottom = (short)i_MovieFrame.size.height;
> theMovieFrame.right = (short)i_MovieFrame.size.width;

One is working in terms of a top left point and bottom right point
while the other is working in terms of an origin and extent (size).
What you are doing above doesn't convert correctly between these two
concepts.

For example if left starts at 100 then right would be 100 + width.

Also you may have to flip the y-axis (not sure if that is needed or not).

-Shawn
_______________________________________________

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

References: 
 >NSRect to carbon Rect conversion (From: Cormac Daly <email@hidden>)

  • Prev by Date: Re: Obj-C and Mac OS BSIT Degree
  • Next by Date: Circular initialization of controllers in NIB file
  • Previous by thread: NSRect to carbon Rect conversion
  • Next by thread: Re: NSRect to carbon Rect conversion
  • Index(es):
    • Date
    • Thread