I’m new to Cocos2dx and pretty new to game development in general. I was looking for some help / direction as to finding a Android 9patch equivalent.
See Android 9patch description here: http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
Basically you have a 1px transparent border around an image and draw black pixels in the top and left border to define which areas can be repeated (and where the content should be placed when we’re talking about control backgrounds).
In my case I’m trying to stretch an image to become my game’s background. In the corners there’s some complicated lines that I want to keep at px size, while a range of pixels along X and Y can be repeated without causing issues.
I’ve been playing with CCScale9Sprite, from what I could tell it was the closest to what I was looking for with no luck.
Everytime I setCapInsets the image goes invisible.
Can anyone help me with this or have some code examples achieving something similar?
bgTest2.9.png (25.5 KB)