public final class ImFontAtlas extends ImGuiStructDestroyable
ptr
Constructor and Description |
---|
ImFontAtlas() |
ImFontAtlas(long ptr) |
Modifier and Type | Method and Description |
---|---|
int |
addCustomRectFontGlyph(ImFont imFont,
short id,
int width,
int height,
float advanceX) |
int |
addCustomRectFontGlyph(ImFont imFont,
short id,
int width,
int height,
float advanceX,
float offsetX,
float offsetY)
Id needs to be
< 0x110000 to register a rectangle to map into a specific font. |
int |
addCustomRectRegular(int width,
int height) |
void |
addFlags(int flags)
Build flags (see
ImFontAtlasFlags ) |
ImFont |
addFont(ImFontConfig imFontConfig) |
ImFont |
addFontDefault() |
ImFont |
addFontDefault(ImFontConfig imFontConfig) |
ImFont |
addFontFromFileTTF(java.lang.String filename,
float sizePixels) |
ImFont |
addFontFromFileTTF(java.lang.String filename,
float sizePixels,
ImFontConfig imFontConfig) |
ImFont |
addFontFromFileTTF(java.lang.String filename,
float sizePixels,
ImFontConfig imFontConfig,
short[] glyphRanges) |
ImFont |
addFontFromFileTTF(java.lang.String filename,
float sizePixels,
short[] glyphRanges) |
ImFont |
addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85,
float sizePixels)
'compressed_font_data_base85' still owned by caller.
|
ImFont |
addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85,
float sizePixels,
ImFontConfig imFontConfig)
'compressed_font_data' still owned by caller.
|
ImFont |
addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85,
float sizePixels,
ImFontConfig imFontConfig,
short[] glyphRanges)
'compressed_font_data_base85' still owned by caller.
|
ImFont |
addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85,
float sizePixels,
short[] glyphRanges)
'compressed_font_data_base85' still owned by caller.
|
ImFont |
addFontFromMemoryCompressedTTF(byte[] compressedFontData,
float sizePixels)
'compressed_font_data' still owned by caller.
|
ImFont |
addFontFromMemoryCompressedTTF(byte[] compressedFontData,
float sizePixels,
ImFontConfig imFontConfig)
'compressed_font_data' still owned by caller.
|
ImFont |
addFontFromMemoryCompressedTTF(byte[] compressedFontData,
float sizePixels,
ImFontConfig imFontConfig,
short[] glyphRanges)
'compressed_font_data' still owned by caller.
|
ImFont |
addFontFromMemoryCompressedTTF(byte[] compressedFontData,
float sizePixels,
short[] glyphRanges)
'compressed_font_data' still owned by caller.
|
ImFont |
addFontFromMemoryTTF(byte[] fontData,
float sizePixels)
Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
|
ImFont |
addFontFromMemoryTTF(byte[] fontData,
float sizePixels,
ImFontConfig imFontConfig)
Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
|
ImFont |
addFontFromMemoryTTF(byte[] fontData,
float sizePixels,
ImFontConfig imFontConfig,
short[] glyphRanges)
Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
|
ImFont |
addFontFromMemoryTTF(byte[] fontData,
float sizePixels,
short[] glyphRanges)
Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas.
|
boolean |
build()
Build pixels data.
|
void |
clear()
Clear all input and output.
|
void |
clearFonts()
Clear output font data (glyphs storage, UV coordinates).
|
void |
clearInputData()
Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts.
|
void |
clearTexData()
Clear output texture data (CPU side).
|
protected long |
create() |
int |
getFlags()
Build flags (see
ImFontAtlasFlags ) |
short[] |
getGlyphRangesChineseFull()
Default + Half-Width + Japanese Hiragana/Katakana + full set of about 21000 CJK Unified Ideographs
|
short[] |
getGlyphRangesChineseSimplifiedCommon()
Default + Half-Width + Japanese Hiragana/Katakana + set of 2500 CJK Unified Ideographs for common simplified Chinese
|
short[] |
getGlyphRangesCyrillic()
Default + about 400 Cyrillic characters
|
short[] |
getGlyphRangesDefault()
Basic Latin, Extended Latin
|
short[] |
getGlyphRangesJapanese()
Default + Hiragana, Katakana, Half-Width, Selection of 2999 Ideographs
|
short[] |
getGlyphRangesKorean()
Default + Korean characters
|
short[] |
getGlyphRangesThai()
Default + Thai characters
|
short[] |
getGlyphRangesVietnamese()
Default + Vietnamese characters
|
boolean |
getLocked()
Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
|
java.nio.ByteBuffer |
getTexDataAsAlpha8(ImInt outWidth,
ImInt outHeight)
1 byte-per-pixel
|
java.nio.ByteBuffer |
getTexDataAsAlpha8(ImInt outWidth,
ImInt outHeight,
ImInt outBytesPerPixel)
1 byte-per-pixel
|
java.nio.ByteBuffer |
getTexDataAsRGBA32(ImInt outWidth,
ImInt outHeight)
4 bytes-per-pixel
|
java.nio.ByteBuffer |
getTexDataAsRGBA32(ImInt outWidth,
ImInt outHeight,
ImInt outBytesPerPixel)
4 bytes-per-pixel
|
int |
getTexDesiredWidth()
Texture width desired by user before Build().
|
int |
getTexGlyphPadding()
Padding between glyphs within texture in pixels.
|
int |
getTexID()
User data to refer to the texture once it has been uploaded to user's graphic systems.
|
boolean |
hasFlags(int flags)
Build flags (see
ImFontAtlasFlags ) |
boolean |
isBuilt() |
void |
removeFlags(int flags)
Build flags (see
ImFontAtlasFlags ) |
void |
setFlags(int imFontAtlasFlags)
Build flags (see
ImFontAtlasFlags ) |
void |
setLocked(boolean locked)
Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
|
void |
setTexDesiredWidth(int texDesiredWidth)
Texture width desired by user before Build().
|
void |
setTexGlyphPadding(int texGlyphPadding)
Padding between glyphs within texture in pixels.
|
void |
setTexID(int textureID) |
destroy
isNotValidPtr, isValidPtr
protected long create()
create
in class ImGuiStructDestroyable
public ImFont addFont(ImFontConfig imFontConfig)
public ImFont addFontDefault()
public ImFont addFontDefault(ImFontConfig imFontConfig)
public ImFont addFontFromFileTTF(java.lang.String filename, float sizePixels)
public ImFont addFontFromFileTTF(java.lang.String filename, float sizePixels, ImFontConfig imFontConfig)
public ImFont addFontFromFileTTF(java.lang.String filename, float sizePixels, short[] glyphRanges)
public ImFont addFontFromFileTTF(java.lang.String filename, float sizePixels, ImFontConfig imFontConfig, short[] glyphRanges)
public ImFont addFontFromMemoryTTF(byte[] fontData, float sizePixels)
public ImFont addFontFromMemoryTTF(byte[] fontData, float sizePixels, ImFontConfig imFontConfig)
public ImFont addFontFromMemoryTTF(byte[] fontData, float sizePixels, short[] glyphRanges)
public ImFont addFontFromMemoryTTF(byte[] fontData, float sizePixels, ImFontConfig imFontConfig, short[] glyphRanges)
public ImFont addFontFromMemoryCompressedTTF(byte[] compressedFontData, float sizePixels)
public ImFont addFontFromMemoryCompressedTTF(byte[] compressedFontData, float sizePixels, ImFontConfig imFontConfig)
public ImFont addFontFromMemoryCompressedTTF(byte[] compressedFontData, float sizePixels, short[] glyphRanges)
public ImFont addFontFromMemoryCompressedTTF(byte[] compressedFontData, float sizePixels, ImFontConfig imFontConfig, short[] glyphRanges)
public ImFont addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85, float sizePixels)
public ImFont addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85, float sizePixels, ImFontConfig imFontConfig)
public ImFont addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85, float sizePixels, short[] glyphRanges)
public ImFont addFontFromMemoryCompressedBase85TTF(java.lang.String compressedFontDataBase85, float sizePixels, ImFontConfig imFontConfig, short[] glyphRanges)
public void clearInputData()
public void clearTexData()
public void clearFonts()
public void clear()
public boolean build()
public java.nio.ByteBuffer getTexDataAsAlpha8(ImInt outWidth, ImInt outHeight)
public java.nio.ByteBuffer getTexDataAsAlpha8(ImInt outWidth, ImInt outHeight, ImInt outBytesPerPixel)
public java.nio.ByteBuffer getTexDataAsRGBA32(ImInt outWidth, ImInt outHeight)
public java.nio.ByteBuffer getTexDataAsRGBA32(ImInt outWidth, ImInt outHeight, ImInt outBytesPerPixel)
public boolean isBuilt()
public void setTexID(int textureID)
public short[] getGlyphRangesDefault()
public short[] getGlyphRangesKorean()
public short[] getGlyphRangesJapanese()
public short[] getGlyphRangesChineseFull()
public short[] getGlyphRangesChineseSimplifiedCommon()
public short[] getGlyphRangesCyrillic()
public short[] getGlyphRangesThai()
public short[] getGlyphRangesVietnamese()
public int addCustomRectRegular(int width, int height)
public int addCustomRectFontGlyph(ImFont imFont, short id, int width, int height, float advanceX)
public int addCustomRectFontGlyph(ImFont imFont, short id, int width, int height, float advanceX, float offsetX, float offsetY)
<
0x110000 to register a rectangle to map into a specific font.public boolean getLocked()
public void setLocked(boolean locked)
public int getFlags()
ImFontAtlasFlags
)public void setFlags(int imFontAtlasFlags)
ImFontAtlasFlags
)public void addFlags(int flags)
ImFontAtlasFlags
)public void removeFlags(int flags)
ImFontAtlasFlags
)public boolean hasFlags(int flags)
ImFontAtlasFlags
)public int getTexID()
public int getTexDesiredWidth()
public void setTexDesiredWidth(int texDesiredWidth)
public int getTexGlyphPadding()
public void setTexGlyphPadding(int texGlyphPadding)