• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Text rendered in NSImage is fuzzy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text rendered in NSImage is fuzzy


  • Subject: Text rendered in NSImage is fuzzy
  • From: Dave Fernandes <email@hidden>
  • Date: Sun, 27 Jun 2010 16:12:00 -0400

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@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

  • Follow-Ups:
    • Re: Text rendered in NSImage is fuzzy
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: Re: Weak-linking a class
  • Next by Date: Re: Text rendered in NSImage is fuzzy
  • Previous by thread: [Possible Bug] Keyboard causes popover content view to scroll out of bounds
  • Next by thread: Re: Text rendered in NSImage is fuzzy
  • Index(es):
    • Date
    • Thread