IndexedSprite

Group
player
Methods
17
Fields
None

Getting one

ImageUtil.getImageIndexedSprite(…)
client:createIndexedSprite()

Methods

MethodReturnsDescription
getPixels(){number}The palette indices, row by row (width * height of them).
setPixels({number})()Set the palette indices (each taken as a signed byte: -1 is index 255).
getPalette(){number}The palette: 24-bit RGB colours, entry 0 unused (index 0 is never drawn).
setPalette({number})()Set the palette (at most 256 colours).
getOffsetX()numberWhere the stored pixels start in the full frame, across.
setOffsetX(number)()Set the across offset.
getOffsetY()numberWhere the stored pixels start in the full frame, down.
setOffsetY(number)()Set the down offset.
getWidth()numberThe stored pixels' width.
setWidth(number)()Set the stored pixels' width.
getHeight()numberThe stored pixels' height.
setHeight(number)()Set the stored pixels' height.
getOriginalWidth()numberThe full frame's width: what the font advances by after the icon.
setOriginalWidth(number)()Set the full frame's width.
getOriginalHeight()numberThe full frame's height: the font aligns the icon's bottom on the text's baseline by it.
setOriginalHeight(number)()Set the full frame's height.
equals(any)booleanWhether other equals this IndexedSprite, as == answers it (false for a value of another class).

Returned by

MethodReturnsDescription
Client.createIndexedSpriteIndexedSpriteA new, empty IndexedSprite (no pixels, no palette, every size 0).
Client.getModIcons{IndexedSprite}?The chat icons <img=n> draws, as a live 1-based view of the client's array (one for every plugin): icons[n + 1] is the icon <img=n> d…
ImageUtilClass.getImageIndexedSpriteIndexedSpriteThe image as an IndexedSprite (a chat icon for client:getModIcons()): a palette of its fully opaque colours after an unused entry 0, ev…

Method details

setPixels

setPixels: (IndexedSprite, {number}) -> ()

Set the palette indices (each taken as a signed byte: -1 is index 255).

getPalette

getPalette: (IndexedSprite) -> {number}

The palette: 24-bit RGB colours, entry 0 unused (index 0 is never drawn).

equals

equals: (IndexedSprite, any) -> boolean

Whether other equals this IndexedSprite, as == answers it (false for a value of another class).