On 12/15/09 13:04, "Christiaan Hofman" <cmhof...@gmail.com> wrote:

> 
> On Dec 15, 2009, at 20:09, Maxwell, Adam R wrote:
> 
>> I notice this is removed, but recall that the centering/scaling is only part
>> of that cell; using -[NSImage bestImageRepForSize:device:] is possibly the
>> more important part, since NSImage often picks a poor representation at many
>> sizes.  This is really noticeable with system images that have multiple
>> reps.  It may be fixed on 10.6 if NSImage/NSImageCell uses
>> -bestRepresentationForRect:context:hints:, but NSImage caching might still
>> get in the way, unless they've fixed it.
>> 
>> -- 
>> Adam
> 
> The release notes indicate a lot of changes to image caching.

Yeah, things improved a lot in 10.6.  NSImage is probably fixed as much as
it can be, short of dumping it entirely.

> And AFAICS 
> NSImageCell draws the correct rep, with the minimum size just larger or equal
> to the target rect. Would you have a test case where things were drawn poorly?

Draw a URL icon in a tableview.  IIRC if the image has a rep of size 16 and
the cell wants an image of that size, it will use it; otherwise, it uses the
largest rep and scales it down.  You used to see this in the main table by
playing with the icon column widths.  At one size it would draw just an "@"
in sharp detail, but at a slightly different size it would draw the "@" with
a fuzzy "HTTP" below it.

It's also very worthwhile to badge individual reps of system icons, say if
you want to apply a CIFilter and change the color (and maybe you do this...I
haven't looked recently).  I found that you can end up with some nasty edge
artifacts otherwise.

Note that I don't recall trying any of this on 10.6, but I can only use that
at home anyway.


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to