Re: Resolution-independent toolbar icons
Re: Resolution-independent toolbar icons
- Subject: Re: Resolution-independent toolbar icons
- From: Phill Kelley <email@hidden>
- Date: Wed, 27 Jun 2007 17:58:15 +1000
At 10:19 +1000 19/6/07, Chris Suter wrote:
>I think this might be relevant:
>
>http://alastairs-place.net/2007/02/pdfs-and-nstoolbar/
Brilliant! Solves the problem. To save time for the next person treading
down this path:
NSImage *image = [NSImage imageNamed:@"fred.pdf"];
NSPDFImageRep *pdf = [[image representations] objectAtIndex:0];
[pdf setAlpha:YES];
[toolbarItem setImage:image];
As it happens, I'm using more generalised code than that. I use
isKindOfClass to see if the representation is an NSPDFImageRep and then
call the setAlpha (so that I can mix and match tiffs and PDFs as I migrate)
but the above is the gist of what is needed.
For the record, I'm still using PDFs with a nominal 128x128 pixel bounding box.
Thanks to all.
Phill
_______________________________________________
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