• 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
Re: Text blurred in application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text blurred in application


  • Subject: Re: Text blurred in application
  • From: Ricky Sharp <email@hidden>
  • Date: Sat, 29 Nov 2008 11:34:58 -0600


On Nov 29, 2008, at 10:57 AM, Richard Somers wrote:

I just discovered part of my problem. The pdf image was being scaled down slightly even though there was plenty of room for it inside the NSButton. The default scaling is "Proportionally Down". Change this to "None" and the image now is always sharp, at least for a User Interface Resolution of 1.0.

Change the User Interface Resolution to 1.25 or 1.5 and the pdf image is ok but not great. This is apparently because "A shape is scan-converted by painting any pixel whose square region intersects the shape, no matter how small the intersection is." according to the "Scan Conversion Rules" in the pdf standard. I think this is why it looks less sharp at these resolutions. Note that fonts get special treatment and will render more "precisely" because they are hinted.

Anyway, perhaps this is why the final image used for many Apple widgets are bitmapped tiff files and not vector pdf. You can tweak each and every pixel in a tiff file if you want to. For me I just wanted to make single vector image and be done with it.


YMMV, but over 99% of my apps images are all vector-based PDF. They scale beautifully at any scaling factor between 0.5 and 3.0 (to include the non-integral ones).

Artwork is anything from very simple to very complex (to include vectorized versions of original artwork from Poser).

I created a class to manage drawing of such images. When drawing, you must "normalize" the destination rect such that it will always fall on integral boundaries:

+ (void)makeIntegralRectForScaling_II:(NSRect*)aRect
{
	if (scalingFactor_II != 1.0)
		{
		aRect->origin.x *= scalingFactor_II;
		aRect->origin.y *= scalingFactor_II;
		aRect->size.width *= scalingFactor_II;
		aRect->size.height *= scalingFactor_II;

		*aRect = NSIntegralRect (*aRect);

		aRect->origin.x /= scalingFactor_II;
		aRect->origin.y /= scalingFactor_II;
		aRect->size.width /= scalingFactor_II;
		aRect->size.height /= scalingFactor_II;
		}
}

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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


References: 
 >Text blurred in application (From: Adil Saleem <email@hidden>)
 >Re: Text blurred in application (From: Richard Somers <email@hidden>)
 >Re: Text blurred in application (From: Benjamin Dobson <email@hidden>)
 >Re: Text blurred in application (From: Richard Somers <email@hidden>)
 >Re: Text blurred in application (From: Richard Somers <email@hidden>)

  • Prev by Date: Re: CALayer containing a view
  • Next by Date: Sorting an NSTableView
  • Previous by thread: Re: Text blurred in application
  • Next by thread: Re: Text blurred in application
  • Index(es):
    • Date
    • Thread