Using [NSColor colorWithPatternImage:] appears to ignore the resolution of the image. For example if I have a 100 x 100 pixel 600 dpi image, the pattern is rendered with 100 x 100 point tiles at 72 dpi, rather than 12 x 12 point tiles at 600 dpi. Is this intentional, or is it a bug?

Also, when the same pattern is printed rather than drawn on screen, it still has 72 dpi resolution, which is very pixellated and looks nasty (jn my test case the pattern consists of many fine dots).

I'm creating the pattern like this:

NSImage* image = [[NSImage alloc] initWithContentsOfFile:[sheet filename]];
                [image setCacheMode:NSImageCacheNever];
                [image setScalesWhenResized:YES];
                [image recache];

                NSColor* patColour = [NSColor colorWithPatternImage:image];
                [image release];


(the cache never setting was an attempt to avoid this problem but it has no effect).

--Graham


_______________________________________________

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