• 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
NSImage size vs. representations' sizes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage size vs. representations' sizes


  • Subject: NSImage size vs. representations' sizes
  • From: Jacob Bandes-Storch <email@hidden>
  • Date: Sat, 2 Aug 2008 14:19:48 -0700

I'm trying to use my application icon (icns) in a custom view to be draw in the background of a window, like Installer.app does. I can do all this just fine, but when I draw the image using - drawInRect:fromRect:operation:fraction:, it comes out at 128x128 instead of the full 512x512. -size returns an NSSize of {128, 128}, but -representations clearly shows that it contains representations all the way from 16x16 to 512x512. My question is, how do I use the largest representation for drawing? Do I have to do [[img bestRepresentationForDevice:[NSDictionary dictionaryWithObject: [NSValue valueWithSize:NSMakeSize(512, 512)] forKey:NSDeviceResolution]] drawInRect:rect]; or is there a better way?
_______________________________________________


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: NSImage size vs. representations' sizes
      • From: Marcel Weiher <email@hidden>
  • Prev by Date: Re: Some crash.
  • Next by Date: Re: Launch Path Not Accessible
  • Previous by thread: How to debug Core Data save-as failure
  • Next by thread: Re: NSImage size vs. representations' sizes
  • Index(es):
    • Date
    • Thread