类 JImTextureID

java.lang.Object
org.ice1000.jimgui.JImTextureID

public final class JImTextureID extends Object
Cannot use after closing the current window
从以下版本开始:
v0.2
  • 字段详细资料

    • width

      public final int width
    • height

      public final int height
  • 方法详细资料

    • fromFile

      @NotNull public static @NotNull JImTextureID fromFile(@NotNull @NotNull String fileName)
    • fromUri

      @NotNull public static @NotNull JImTextureID fromUri(@NotNull @NotNull URI uri)
      Create a texture from file.
      参数:
      uri - file path
      返回:
      the texture
      抛出:
      IllegalStateException - if load failed
    • fromFile

      @NotNull public static @NotNull JImTextureID fromFile(@NotNull @NotNull File file)
      Create a texture from file.
      参数:
      file - file instance
      返回:
      the texture
      抛出:
      IllegalStateException - if load failed
    • fromPath

      @NotNull public static @NotNull JImTextureID fromPath(@NotNull @NotNull Path path)
      Create a texture from file.
      参数:
      path - file path
      返回:
      the texture
      抛出:
      IllegalStateException - if load failed
    • fromBytes

      @NotNull public static @NotNull JImTextureID fromBytes(byte @NotNull [] rawData)
      Create a texture from in-memory files
      参数:
      rawData - raw memory data, directly passed to C++
      返回:
      the texture
      抛出:
      IllegalStateException - if native interface cannot create texture
    • fromExistingID

      @NotNull public static @NotNull JImTextureID fromExistingID(long nativeObjectPtr, int width, int height)
      参数:
      nativeObjectPtr - existing texture id, like GLuint in glfw
      width - size, used in JImWidgets.image(JImTextureID)
      height - size, used in JImWidgets.image(JImTextureID)
      返回:
      created texture