Protected
_cachePrivate
imageReadonly
mixPrivate
nineSet to true so the style will be rendered on Padding space.
Static
Protected
_globalHere one needs to do the actual render part of the style element.
is for context. do not use it for layout
the renderer object. context is already taken care of.
is the layouted rectangle in screen coordinates of the given element. Use this for layout!
legacy. Please use setNinePatch()
Option1: explicit data (for spritesheet)
ninePatch = { outerX: 1, outerY: 1, innerX: 3, innerY: 3, innerX2: 6 innerY2: 6, outerX2: 10, outerY2: 10 }
Option2: explicit array (for spritesheet)
ninePatch = [ 1, 1, // outer X/Y 3, 3, // inner X/Y 6, 6, // inner X2/Y2 10, 10 // outer X2/Y2 ]
Option3: implicit outer data (for full image)
ninePatch = { innerX: 3, innerY: 3, innerX2: 6 innerY2: 6, }
outerX/Y will be both 0 outerX2 => image.width - 1, outerY2 => image.height - 1
Option 4: implicit outer data array (for full image)
ninePatch = [ 3, 3, // inner X/Y 6, 6, // inner X2/Y2 ]
outerX2 => image.width - 1, outerY2 => image.height - 1
Option 5: implicit inner data as easelJS rectangle (to be compatible ScaleBitmap)
ninePatch = new Rect( 3, 3, // inner X/Y 3, 3 // inner width, inner height );
Generated using TypeDoc
Nine-Patch
ox ix ix2 ox2 v v v v ---------------------- < oy |A | | | | | | | | | | |
| |B | | < iy | | | | | | C| | < iy2
| | | | | | | | | | | D| ---------------------- < oy2
A: Pixel of outerX and outerY It is the pixel top/left. On a full image it is 0,0
B: Pixel of innerX and innerY It is the pixel top/left of the middle part
C: Pixel of innerX2 and innerY2 It is the pixel bottom/right of the middle part Can be the same as B if the middle part is only one pixel in size
D: Pixel of outerX and outerY It is the right/bottom pixel of the outer part. On a full image it is image.width-1, image.height-1