Module flower.NineImage
This class displays the NinePatch of Android.
The following restrictions exist. In many cases, to solve by wrapping it in Group class.
- setPiv function does not work.
- Scale should not be set directly.
Extends:
Info:
- Release: V3.0.0
- Author: Makoto
Functions
NineImage:init (imagePath, width, height) | Constructor. |
NineImage:setImage (imagePath, width, height) | Set the NineImageDeck. |
NineImage:setSize (width, height) | Set the scale to match the size. |
NineImage:getDims () | Returns the dummey dimensions. |
NineImage:getBounds () | Returns the dummey bounds. |
NineImage:setPiv (xPiv, yPiv, zPiv) | Unsupported pivot. |
NineImage:getContentRect () | Returns the content rect from NinePatch. |
NineImage:getContentPadding () | Returns the content padding from NinePatch. |
Functions
- NineImage:init (imagePath, width, height)
-
Constructor.
Parameters:
- imagePath File path NinePach.
- width (option) Width of image.
- height (option) Height of image.
- NineImage:setImage (imagePath, width, height)
-
Set the NineImageDeck.
Parameters:
- imagePath File path or NineImageDeck.
- width (option) Width of image.
- height (option) Height of image.
- NineImage:setSize (width, height)
-
Set the scale to match the size.
Is set as the size artificially.
Parameters:
- width Width of image.
- height Height of image.
- NineImage:getDims ()
-
Returns the dummey dimensions.
Returns:
- sacled width
- scaled height
- 0
- NineImage:getBounds ()
-
Returns the dummey bounds.
Returns:
- xMin(0)
- yMin(0)
- zMin(0)
- xMax(sacled width)
- yMax(scaled height)
- 0
- NineImage:setPiv (xPiv, yPiv, zPiv)
-
Unsupported pivot.
Parameters:
- xPiv
- yPiv
- zPiv
- NineImage:getContentRect ()
-
Returns the content rect from NinePatch.
Returns:
- xMin
- yMin
- xMax
- yMax
- NineImage:getContentPadding ()
-
Returns the content padding from NinePatch.
Returns:
- paddingLeft
- paddingTop
- paddingRight
- paddingBottom