chrislondon / 9-Patch-Image-for-Websites

UNMAINTAINED -- Javascript file to allow 9 patch images on the web. For a more detailed explanation of 9-patch images read here: http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
88 stars 30 forks source link

Add support for stretching vs. repeating #11

Closed chrislondon closed 12 years ago

chrislondon commented 13 years ago

The original test 9patch image I used was a repeated and not stretched image. I believe stretching is the more appropriate method for implementation. We may want to support both.

chrislondon commented 12 years ago

We need to add the top left corner is the color of the static pixels. As there isn't any other standard that I can see the top right corner will now be the repeat color. If the top right matches the top left then there will be no repeating. Stretching will be any other color.