Re: Drawing an image via 9 slices?
Re: Drawing an image via 9 slices?
- Subject: Re: Drawing an image via 9 slices?
- From: Randall Meadows <email@hidden>
- Date: Wed, 22 Oct 2008 17:33:12 -0600
On Oct 22, 2008, at 5:26 PM, Ashley Clark wrote:
On Oct 22, 2008, at 6:21 PM, Randall Meadows wrote:
I'd have sworn in times past I've run across a Cocoa method that
takes 9 "slice" of an image, and expands the middle piece while
retaining the outer 8 pieces to create an "expandable" image.
(Imagine a button image with a custom border, but a plain gray
middle. using this alleged method, you could draw that image at
any size, the border looks correct at all sizes, because only the
middle slice (both horizontally and vertically) grows.)
Can anyone refresh my memory of what this beast is? Or am I
hallucinating (again)?
It's new in Leopard and not documented well (or at all?) outside of
the header file. Look in NSCell.h for NSDrawNinePartImage though.
Yes, that's exactly it! Thank you for validating my sanity. (OK,
yes, that's stretching things.)
And yes, it appears to be completely UNdocumented, except for the
header file.
Thanks a bunch!
randy
_______________________________________________
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