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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/pammon%40apple.com

This email sent to pam...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to