Re: Re: What's the fastest way to get icons for file/folders?
Re: Re: What's the fastest way to get icons for file/folders?
- Subject: Re: Re: What's the fastest way to get icons for file/folders?
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 18 Aug 2006 14:32:14 -0700
On 8/18/06, Alan Smith <email@hidden> wrote:
So, now that all of your were nice enough to criticize me I have
another question.
Don't lump the rest of us into that group... I mean many of us on this
list haven't had a chance yet to criticize. =P
Once I've PlotIconRefInContext I can't resize the image unless I want
the icon to look terrible. Which I don't. So, how do I use
PlotIconRefInContext to make it look code?
I figure I could use a loop and just shrink the rect that it draws
into every iteration. But that might not be too smart.
Can you better explain what you are trying to do? How are you
displaying the images you are creating from the icon?
I would think that PlotIconRefInContext has logic to optimally render
a given icon (picks the closest image resource from the icon resource)
so any additional sizing you do will likely affect image quality.
Off the top of my head I can think of a few ways to attack this issue...
1) use PlotIconRefInContext to draw into NSImages as you are currently
doing but have the initial size of the image as large as you would
ever expect to display. Then down size from their as needed.
2) do (1) but recreate your image cache with icons sized as needed
using PlotIconRefInContext again.
3) don't cache NSImage reps of the icons but the icons themselves and
use PlotIconRefInContext to draw when you need to draw (the context
can be a screen related context).
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden