A NineSlice is an automatically scaling graphic cut into nine segments (upper/middle/lower and left/middle/right.) NineSlice is useful when a graphic has borders that should remain a constan size as the graphic scales (such as a UI button or panel.)
Constructor
new (source : ImageType, leftWidth : Int = 0, rightWidth : Int = 0, topHeight : Int = 0, bottomHeight : Int = 0) : Void
Constructor.
Parameters:
source | Source image | |
leftWidth | Distance from left side of the source image used for 9-slicing the image | |
rightWidth | Distance from right side of the source image used for 9-slicing the image | |
topHeight | Distance from top side of the source image used for 9-slicing the image | |
bottomHeight | Distance from bottom side of the source image used for 9-slicing the image |
Variables
height : Float
scaleBorder : Bool
If false, the borders will always be drawn at their native resolution, regardless of screen scale.
width : Float