# Class: StretchedSkinnedImage

### LuxModule: gui

A skinned image is an image that uses a special texture to create a 2D rectangle visual surface.

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 vertically. 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.

## Hierarchy

    o-+ Skin2D
      o-+ StretchedSkinnedImage

## Methods:

new (class,string/texture tex,float top,right,bottom,left, [table uvs])
  returns: ()

  creates new object of given class and initializes the stretchedimageskin specific variables of this object.

  If the texture is a string, the texture is being loaded without compression. This has no effect if the image was loaded before with compression. This affects only configurations where compression is enabled.

  The 4 integer arguments top, right, bottom and left are the widths of the borders which are used in the way as the class description.

  The uvs are optional and can be used to specify regions on the texture to be used for a certain surface. The table must contain named arrays of coordinates, i.e. `{default = {x,y,width,height}}` where the coordinates specify the regions to be used. Creating a single texture with multiple GUI components to be used is more efficient and easier to be created. The uvs must be named to provide different surfaces for instance, if assigned to a button, the button will ask for different surfaces if the button is clicked, hovered and so on. Look up the documentation on the components that are using skins for a detailed overview on the surfaces for skins.

  If no uvs are passed, the skin will stretch out for the whole image. If a requested surface in a skin is not specified in the uvs table, the whole image will be used also. Additionally the uvpositions can overload the margin widths. The format for the uvpositions is

       {x, y, width, height, [top, left, right, bottom]}

  All coordinates are in absolute pixel coordinates.

  Per default, the filtering of the skin texture is deactivated if the size of the window is the same as the refsize for the drawn objects. Otherwise the filtering value is not touched. Be aware that the skins will look best if they are drawn in the same size as they really are.

## Inherited Methods:

### From Skin2D

ALIGN.BOTTOM, ALIGN.CENTER, ALIGN.ICONTOBOTTOM, ALIGN.ICONTOLEFT, ALIGN.ICONTORIGHT, ALIGN.ICONTOTOP, ALIGN.LEFT, ALIGN.RIGHT, ALIGN.TOP, REASON.COLORCHANGED, REASON.CREATEDVIS, REASON.DELETEDVIS, REASON.ICONCHANGED, REASON.NEWTEXT, REASON.RESIZED, REASON.SKINCHANGE, REASON.VISCHANGE, bound.h, bound.w, bound.x, bound.y, bounds, clone, contains, copystylefrom, createVisibles, currentskin, defaultfont, delete, deleteVisibles, getBounds, getClip, getClipping, getFontColor, getFontset, getIcon, getIconMargin, getIconSkinSelection, getLabelSize, getLabelText, getPadding, getPreferredBounds, getPreferredLocation, getPreferredSize, getSelectedSkin, getSkinColor, icon, iconalignhorizontal, iconalignvertical, id, new, onDestroy, paddings, pbottom, pleft, pright, ptop, selectSkin, setAutowidth, setBounds, setClip, setClipping, setDimensions, setFont, setFontColor, setIcon, setIconAlignment, setIconMargin, setIconSkinSelection, setLabelFontSize, setLabelFontSpacing, setLabelPosition, setLabelTabWidth, setLabelText, setLocation, setPadding, setPaddingAll, setSkinColor, setSortID, setTextAlignment, setVisibility, setZ, texthorizontal, textvertical, toString, update, z