# Class: ImageIcon

### LuxModule: gui

ImageIcon objects are using textures to display little icons in GUIs. A texture can be used for multiple different icons.

## Hierarchy

    o-+ Icon
      o-+ ImageIcon

## Methods:

new (class,string/texture tex, width, height, blendmode, [table iconpositions], [table color])
  returns: ()

  Creates image icon from texture. The texture can be either a string or a loaded textures. If a string is passed the texture is being loaded without texture compression (if it is on anyway).

  The width and height is going to be used as size for the icon. The blendmode is going to be used for the the icon.

  The iconpositions is an associative array contiaining values with the x,y coordinates and widths and heights of the parts of the texture to be used. The default entry is used if no value for the selected icon is found. Components will use names to load certain icons in different states (hovered, pressed, etc.) and you can specify here where the correct icon is to be found on the image. If no iconposition is passed, the whole texture is used as icon.

  All coordinates are in pixel coordinates.

  Per default, the filtering of the icon 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 icons will look best if they are drawn in the same size as they really are.

## Inherited Methods:

### From Icon

REASON.COLORCHANGE, REASON.CREATEDVIS, REASON.DELETEDVIS, REASON.RESIZED, REASON.SKINCHANGE, REASON.VISCHANGE, clone, color, contains, createVisibles, delete, deleteVisibles, getClip, getHeight, getSize, getWidth, height, id, new, onDestroy, selectIcon, setBounds, setClip, setLocation, setSortID, setVisibility, setZ, surface, toString, update, visibleflag, width, x, y, z