Class Texture

java.lang.Object
dev.gothickit.zenkit.tex.Texture
All Implemented Interfaces:
NativeObject

public final class Texture extends Object implements NativeObject
  • 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:
      getNativeHandle in interface NativeObject
    • getFormat

      public TextureFormat 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

      @Nullable public @Nullable Color[] getPalette()
    • getMipmapRaw

      public byte[] getMipmapRaw(long level)
    • getMipmapRgba

      public byte[] getMipmapRgba(long level)
    • getAllMipmapsRaw

      public List<byte[]> getAllMipmapsRaw()
    • getAllMipmapsRgba

      public List<byte[]> getAllMipmapsRgba()