-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|262|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Text and GUI's


 
Cower
Created : 15 May 2010
 

NinePatch Image

NinePatch image similar to the ninepatch drawables in Android OS.

Short description sort of sums it up.

Basically, load an image (animated or not), create a NNinePatch, and call the InitWithImage method and pass the image to it. You can specify the top, left, bottom, and right border sizes as well as scaling for those (e.g., if you have a high-resolution image and you want the 50x50 pixel corners to be 10x10 pixel corners, you'd pass a scale of 0.2).

As an example, here's an image you can load and some test code:




 

Comments