Re: How to make template images?
Re: How to make template images?
- Subject: Re: How to make template images?
- From: Ken Ferry <email@hidden>
- Date: Fri, 10 Sep 2010 15:03:32 -0700
On Fri, Sep 10, 2010 at 10:58 AM, Marc Respass <email@hidden> 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 (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
>
_______________________________________________
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