getWidth
getWidth: (SpritePixels) -> numberThe stored width (the pixels' row length).
ImageUtil.getImageSpritePixels(…)
client:drawInstanceMap(…)
client:createSpritePixels(…)| Method | Returns | Description |
|---|---|---|
getWidth() | number | The stored width (the pixels' row length). |
getHeight() | number | The stored height. |
getMaxWidth() | number | The full frame's width. |
getMaxHeight() | number | The full frame's height. |
getOffsetX() | number | Where the stored pixels start in the frame, across. |
getOffsetY() | number | Where the stored pixels start in the frame, down. |
getPixels() | {number} | The pixels, row by row (a copy; element 1 is pixel 0): a client sprite's 24-bit RGB, 0 transparent and a drawn black 1; a sprite made f… |
toBufferedImage() | BufferedImage | A new getWidth() x getHeight() image of the pixels, every non-zero pixel ORed opaque (a drawn black reads 0xff000001). |
toBufferedOutline(Color) | BufferedImage | A new image of the sprite's outline in color: each pixel that is 0 or 0xffffff beside a non-zero one becomes color, every other pix… |
| Field | Type | Description |
|---|---|---|
DEFAULT_SHADOW_COLOR | number | SpritePixels.DEFAULT_SHADOW_COLOR. |
| Method | Returns | Description |
|---|---|---|
Client.createItemSprite | SpritePixels? | Item itemId's inventory sprite as the client draws it (quantity, border, shadowColor, stackable mode, scale), at once on the ga… |
Client.createSpritePixels | SpritePixels | A sprite of pixels (width * height ints, row by row, as given: getPixels() answers them back unchanged, alpha included, and 0 draws n… |
Client.drawInstanceMap | SpritePixels | A picture of plane z (0..3) of the loaded scene, 736 pixels a side (the 184-tile extended scene at 4 pixels a tile, north up), drawn by t… |
Client.getCrossSprites | {SpritePixels}? | The click cross frames (4 yellow, then 4 red), as a live 1-based view of the array the client draws from (one for every plugin): `crosses[i… |
Client.getMapDots | {SpritePixels} | The minimap's dot sprites, a live 1-based view by dot id + 1 (DOT_ITEM 0 is dots[1], then DOT_NPC, DOT_PLAYER, DOT_FRIEND, `DOT_T… |
Client.getSpriteOverrides | {[number]: SpritePixels} | The sprite overrides, sprite id to SpritePixels as a keyed table (the same table every call, shared by every plugin): `t[spriteId] = spri… |
Client.getSprites | {SpritePixels}? | Every frame of sprite group archiveId (a SpriteID), decoded now: the client's SpriteBuffer read, as spriteManager:getSprite reads o… |
Client.getWidgetSpriteOverrides | {[number]: SpritePixels} | The widget sprite overrides, by packed widget id (InterfaceID), the same keyed table form: the widget draws sprite in place of its own… |
ImageUtilClass.getImageSpritePixels | SpritePixels | The image as SpritePixels: its ARGB pixels, every fully transparent one 0. Pass the client global. |
getWidthgetWidth: (SpritePixels) -> numberThe stored width (the pixels' row length).
getHeightgetHeight: (SpritePixels) -> numberThe stored height.
getMaxWidthgetMaxWidth: (SpritePixels) -> numberThe full frame's width.
getMaxHeightgetMaxHeight: (SpritePixels) -> numberThe full frame's height.
getOffsetXgetOffsetX: (SpritePixels) -> numberWhere the stored pixels start in the frame, across.
getOffsetYgetOffsetY: (SpritePixels) -> numberWhere the stored pixels start in the frame, down.
getPixelsgetPixels: (SpritePixels) -> {number}The pixels, row by row (a copy; element 1 is pixel 0): a client sprite's 24-bit RGB, 0 transparent and a drawn black 1; a sprite made from ints (client:createSpritePixels, ImageUtil.getImageSpritePixels) answers them as given. A write to the copy does not change the sprite.
toBufferedImagetoBufferedImage: (SpritePixels) -> BufferedImageA new getWidth() x getHeight() image of the pixels, every non-zero pixel ORed opaque (a drawn black reads 0xff000001).
toBufferedOutlinetoBufferedOutline: (SpritePixels, Color) -> BufferedImageA new image of the sprite's outline in color: each pixel that is 0 or 0xffffff beside a non-zero one becomes color, every other pixel transparent (a lone 0xffffff is kept, which is a transparent white).