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.

  1. setPiv function does not work.
  2. 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:

  1. sacled width
  2. scaled height
  3. 0
NineImage:getBounds ()
Returns the dummey bounds.

Returns:

  1. xMin(0)
  2. yMin(0)
  3. zMin(0)
  4. xMax(sacled width)
  5. yMax(scaled height)
  6. 0
NineImage:setPiv (xPiv, yPiv, zPiv)
Unsupported pivot.

Parameters:

  • xPiv
  • yPiv
  • zPiv
NineImage:getContentRect ()
Returns the content rect from NinePatch.

Returns:

  1. xMin
  2. yMin
  3. xMax
  4. yMax
NineImage:getContentPadding ()
Returns the content padding from NinePatch.

Returns:

  1. paddingLeft
  2. paddingTop
  3. paddingRight
  4. paddingBottom
generated by LDoc 1.3