Hi Ken,

Thanks so much. I will look into -interiorBackgroundStyle. That sounds like the 
key. Meanwhile, we will modify our images to work correctly. I've built an 
image tester and many of them work well and I think we can fix those that don't.

Thanks again
Marc

El Sep 10, 2010, a las 6:03 PM, Ken Ferry escribió:

> On Fri, Sep 10, 2010 at 10:58 AM, Marc Respass <marcresp...@mac.com> wrote:
> Hi,
> 
> I have a need for a lot of different template images in my apps. I have 
> worked with my artist but she is not sure how to build a template image. We 
> have both researched it and we are not finding much good information. The 
> docs on template images say to use "black" and "clear" in the image but it's 
> difficult to make a nice, smooth, small image using only black.
> 
> I've looked at a lot of applications and Mail is a great example. They have 
> the blue dot (which is a gradient) and when you select it, it turns white. 
> How do you do that? Can you use greyscale in the image mask? I've noticed 
> that setting isTemplate on my images will change them; for instance, I have a 
> red lock that we use but when I set it to a template it turns black.
> 
> The image in Mail is not a template image.  If you subclass NSCell, you can 
> choose to draw a different image entirely based on the cell's 
> -interiorBackgroundStyle.  What the base class NSCell itself is doing if the 
> image is a template is choosing the runtime processing based on the cell's 
> -interiorBackgroundStyle (and in some cell subclasses, based on other data of 
> the cell, like if it should appear "on").  If you know more about what's 
> going on, you can get in there and do whatever drawing you want based on the 
> interiorBackgoundStyle.  
>  
> Can you use greyscale in the image mask? 
> 
> Nope, just black with different alpha values.  Think of it like you would a 
> glyph in a font.  It's a mask.
> 
> -Ken
> Cocoa Frameworks
>  
> 
> Can anyone point me and my artist in the right direction to learn more about 
> this? I have read the NSImage docs on template images and so has she but it's 
> not quite enough for us.
> 
> Thanks a lot
> Marc
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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/kenferry%40gmail.com
> 
> This email sent to kenfe...@gmail.com
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to