• 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: CGDisplayBounds vs NSSCreen visibleFrame
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGDisplayBounds vs NSSCreen visibleFrame


  • Subject: Re: CGDisplayBounds vs NSSCreen visibleFrame
  • From: Trygve Inda <email@hidden>
  • Date: Sun, 27 Jul 2008 00:04:57 +0000
  • Thread-topic: CGDisplayBounds vs NSSCreen visibleFrame

The previous code was written in mail. Real code here:

Given an CGDirectDisplayID for an auxScreen, get its frame in modern (0,0 is
bottom left) coordinates.

CGRect   auxScreenRect = CGDisplayBounds (displayID);
CGRect   mainScreenRect = CGDisplayBounds (CGMainDisplayID ());

auxScreenRect.origin.y = -1 *

(auxSreenRect.origin.y + auxScreenRect.size.height -
mainScreenRect.size.height);

//  -1 * (924 + 1050 - 1200) = -774

Seems to work, but it'd be nice if there were a more direct way to obtain
this.

TRygve


_______________________________________________

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: 
 >CGDisplayBounds vs NSSCreen visibleFrame (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Decoding digital POCSAG / analog 5-tone (=selective call) sounds
  • Next by Date: Binding NSArrayController's objects to an NSTextView
  • Previous by thread: CGDisplayBounds vs NSSCreen visibleFrame
  • Next by thread: memory management
  • Index(es):
    • Date
    • Thread