Package dev.gothickit.zenkit.tex
Class Texture
java.lang.Object
dev.gothickit.zenkit.tex.Texture
- All Implemented Interfaces:
NativeObject
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable TexturefromNativeHandle(@Nullable com.sun.jna.Pointer handle) List<byte[]>List<byte[]>intintintgetHeight(long level) intintbyte[]getMipmapRaw(long level) byte[]getMipmapRgba(long level) @NotNull com.sun.jna.Pointer@Nullable Color[]intgetWidth()intgetWidth(long level) intstatic @NotNull Texturestatic @NotNull Texturestatic @NotNull Texture
-
Method Details
-
fromNativeHandle
@Contract("null -> null; !null -> new") @Nullable public static @Nullable Texture fromNativeHandle(@Nullable @Nullable com.sun.jna.Pointer handle) -
load
@Contract("_ -> new") @NotNull public static @NotNull Texture load(@NotNull @NotNull String path) throws ResourceIOException - Throws:
ResourceIOException
-
load
@Contract("_ -> new") @NotNull public static @NotNull Texture load(@NotNull @NotNull Read buf) throws ResourceIOException - Throws:
ResourceIOException
-
load
@Contract("_, _ -> new") @NotNull public static @NotNull Texture load(@NotNull @NotNull Vfs vfs, @NotNull @NotNull String name) throws ResourceIOException - Throws:
ResourceIOException
-
getNativeHandle
@NotNull public @NotNull com.sun.jna.Pointer getNativeHandle()- Specified by:
getNativeHandlein interfaceNativeObject
-
getFormat
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getWidthRef
public int getWidthRef() -
getHeightRef
public int getHeightRef() -
getWidth
public int getWidth(long level) -
getHeight
public int getHeight(long level) -
getMipmapCount
public int getMipmapCount() -
getAverageColor
public int getAverageColor() -
getPalette
-
getMipmapRaw
public byte[] getMipmapRaw(long level) -
getMipmapRgba
public byte[] getMipmapRgba(long level) -
getAllMipmapsRaw
-
getAllMipmapsRgba
-