• 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: email@hidden
  • Date: Thu, 3 Jan 2008 14:19:43 -0500

Date: Thu, 3 Jan 2008 17:04:03 +0000
From: Cormac Daly <email@hidden>
...
theMovieFrame.top = 15;
theMovieFrame.left = 100;
theMovieFrame.bottom = (short)i_MovieFrame.size.height;
theMovieFrame.right = (short)i_MovieFrame.size.width;

Cormac,
you seem to have misunderstood the geometry of the Rect structure Quicktime expects.
while you haver appropriate values in the "top" and "left", your not right in the "bottom" and the "right"


lets take a second and look at the docs to see why...

bottom
The vertical coordinate of the lower-right point of the rectangle.

right
The horizontal coordinate of the lower-right point of the rectangle.

those coordinates should be... the dimension Plus the offset!

 so for "right" you need "left" + "width"

and for "bottom" its "top" + "height"

good luck,

-eblu
_______________________________________________

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


  • Prev by Date: [ANN] AppKiDo 0.971 -- better Leopard support, no brushed metal
  • Next by Date: How do I trigger IBAction with custom "button" based on NSView...
  • Previous by thread: Re: NSRect to carbon Rect conversion
  • Next by thread: Binding table column to complex NSDictionary
  • Index(es):
    • Date
    • Thread