# Class: SkinnedImage

### LuxModule: gui

A skinned image is an image that uses a special texture.

The skin is created from 9 areas on the texture:

     1 2 3
     4 5 6
     7 8 9

The areas 1,3,7 and 9 (the corners) are not stretched, while 2 and 8 are stretched horizontaly while 4 and 6 are stretched verticaly. Area 5 is stretched in both dimensions, depending on the chosen dimension of the image. The SkinnedImage class can handle multiple verticaly aligned skins on one texture that can be displayed one per time.

## Methods:

### Method overview:

- delete
- new
- select
- setScale
- setSize

new (string imagepath, int width, height, top, right, bottom, left, n)
  returns: (SkinableImage)
  Creates an stretched image. Use the imagesize for

  the width and height parameter, while top,right,bottom and left should be the widths and heights of the areas 2,6,8 and 4.

  n denotes the number of skins on the image. I.e if you have a button with two states, you can put them both verticaly aligend next to each other on the same texture and pass 2 as n. One image at time can be selected to be displayed.

  Be aware that the filtering is switched of for the texture.
delete (SkinnedImage)
  returns: ()
  deletes all l2dimages
select (SkinnedImage, [int n])
  returns: ()
  shows the n'ths image (images are enumerated from left to right from 1 to n). If n is not a valid number or is not passed, all images will be hid.
setScale (SkinnedImage, int x,y,[z])
  returns: ()
  applies a scaling to the image(s)
setSize (SkinnedImage, int x,y,[z])
  returns: ()
  moves the image(s) to the given coordinates.