Class ImageData
java.lang.Object
zombie.core.textures.ImageData
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanintstatic final intboolean -
Constructor Summary
ConstructorsConstructorDescriptionImageData(int width, int height) ImageData(int width, int height, WrappedBuffer data) ImageData(InputStream b, boolean bDoMask) ImageData(ImageDataFrame frame) ImageData(TextureID texture, WrappedBuffer bb) -
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateNumMips(int widthHW, int heightHW) static ImageDatacreateSteamAvatar(long steamID) voiddispose()getData()intintintgetMipMapData(int idx) static intgetNextMipDimension(int dim) static int[]getPixelClamped(ByteBuffer dataBuff, int width, int height, int x, int y, int[] result) static intgetPixelDiscard(ByteBuffer dataBuff, int width, int height, int x, int y, int[] result) intgetWidth()intvoidbooleanisSolid()voidmakeTransp(byte red, byte green, byte blue) voidmakeTransp(byte red, byte green, byte blue, byte alpha) static voidsetPixel(ByteBuffer dataBuff, int width, int height, int x, int y, int[] pixelRGBA)
-
Field Details
-
data
-
alphaPaddingDone
public boolean alphaPaddingDone -
preserveTransparentColor
public boolean preserveTransparentColor -
mask
-
id
public int id -
MIP_LEVEL_IDX_OFFSET
public static final int MIP_LEVEL_IDX_OFFSET- See Also:
-
-
Constructor Details
-
ImageData
-
ImageData
-
ImageData
public ImageData(int width, int height) -
ImageData
-
ImageData
-
ImageData
- Throws:
Exception
-
-
Method Details
-
createSteamAvatar
-
getData
-
makeTransp
public void makeTransp(byte red, byte green, byte blue) -
makeTransp
public void makeTransp(byte red, byte green, byte blue, byte alpha) -
getHeight
public int getHeight() -
getHeightHW
public int getHeightHW() -
isSolid
public boolean isSolid() -
getWidth
public int getWidth() -
getWidthHW
public int getWidthHW() -
getMipMapCount
public int getMipMapCount() -
getMipMapData
-
initMipMaps
public void initMipMaps() -
dispose
public void dispose() -
calculateNumMips
public static int calculateNumMips(int widthHW, int heightHW) -
getPixelDiscard
public static int getPixelDiscard(ByteBuffer dataBuff, int width, int height, int x, int y, int[] result) -
getPixelClamped
public static int[] getPixelClamped(ByteBuffer dataBuff, int width, int height, int x, int y, int[] result) -
setPixel
public static void setPixel(ByteBuffer dataBuff, int width, int height, int x, int y, int[] pixelRGBA) -
getNextMipDimension
public static int getNextMipDimension(int dim)
-