I'm trying to render text in System font in an NSImage as shown below. The
NSImage is displayed *unscaled* in an NSImageView. However, the text does not
look as good as when rendered in an NSView. Is there any way to get crisp clean
text in an NSImage?
Thanks,
Dave
// Render an image into a cell of given size (edited in Mail!).
- (void)renderForCellSize:(NSSize)cellSize
{
[image release];
image = [[NSImage alloc] initWithSize:cellSize];
// Draw the image...
[image lockFocus];
[NSGraphicsContext saveGraphicsState];
[chart draw];
[NSGraphicsContext restoreGraphicsState];
[image unlockFocus];
}
The chart does some drawing such as, for example:
NSString* label = @"some text";
[label drawAtPoint:location
withAttributes:labelAttributes];_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]