Re: NSPopupButton with blurry image
Re: NSPopupButton with blurry image
- Subject: Re: NSPopupButton with blurry image
- From: Peter Ammon <email@hidden>
- Date: Mon, 18 May 2009 18:33:10 -0700
Hi Gideon,
It sounds like the PDF image is being rasterized at the point you sent
it on the menu item, and being cached into a NSCachedImageRep; for the
subsequent menu items the cache is used.
If you can arrange for the image to be rasterized before the being set
on the menu item, it would probably fix the problem. The simplest way
to rasterize the image is to draw it; or alternatively make a new
image of the right size, lock focus onto it, draw your PDF into the
new image, unlock focus, and set the new image on the menu item.
On May 18, 2009, at 10:26 AM, Gideon King wrote:
Hi, I have an NSPopupButton which I am populating programmatically.
The button class is set to square because I need it to be bigger
than the standard popup button. I am setting an image on each menu
item (the images are produced as PDF images).
All the images appear correctly, but when I pop up the menu the
first image is always blurry, and the remainder of the images are
crisp. It's as if the first image has been stretched. As an
experiment I put the second image as the same image as the first,
and now it appeared stretched too, which appears to prove the point.
Is this a known issue? How should I ensure that my image is not
stretched?
TIA
Gideon
_______________________________________________
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
_______________________________________________
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