IMGUI_APIvoidClearFonts();// Clear the ImGui-side font data (glyphs storage, UV coordinates)
IMGUI_APIvoidClear();// Clear all
// Retrieve texture data
// User is in charge of copying the pixels into graphics memory, then call SetTextureUserID()
// After loading the texture into your graphic system, store your texture handle in 'TexID' (ignore if you aren't using multiple fonts nor images)
// Build atlas, retrieve pixel data.
// User is in charge of copying the pixels into graphics memory (e.g. create a texture with your engine). Then store your texture handle with SetTexID().
// RGBA32 format is provided for convenience and high compatibility, but note that all RGB pixels are white, so 75% of the memory is wasted.
// Pitch = Width * BytesPerPixels
IMGUI_APIboolBuild();// Build pixels data. This is called automatically for you by the GetTexData*** functions.
// Helpers to retrieve list of common Unicode ranges (2 value per range, values are inclusive, zero-terminated list)
// NB: Make sure that your string are UTF-8 and NOT in your local code page. In C++11, you can create UTF-8 string literal using the u8"Hello world" syntax. See FAQ for details.
IMGUI_APIconstImWchar*GetGlyphRangesDefault();// Basic Latin, Extended Latin
IMGUI_APIconstImWchar*GetGlyphRangesKorean();// Default + Korean characters
IMGUI_APIconstImWchar*GetGlyphRangesJapanese();// Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs
IMGUI_APIconstImWchar*GetGlyphRangesChinese();// Japanese + full set of about 21000 CJK Unified Ideographs
IMGUI_APIconstImWchar*GetGlyphRangesChinese();// Default + Japanese + full set of about 21000 CJK Unified Ideographs
IMGUI_APIconstImWchar*GetGlyphRangesCyrillic();// Default + about 400 Cyrillic characters
IMGUI_APIvoidBuildRanges(ImVector<ImWchar>*out_ranges);// Output new ranges
};
// Members
// (Access texture data via GetTexData*() calls which will setup a default font for you.)
ImTextureIDTexID;// User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
unsignedchar*TexPixelsAlpha8;// 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
unsignedint*TexPixelsRGBA32;// 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
intTexWidth;// Texture width calculated during Build().
intTexHeight;// Texture height calculated during Build().
intTexDesiredWidth;// Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
intTexGlyphPadding;// Padding between glyphs within texture in pixels. Defaults to 1.
ImVec2TexUvWhitePixel;// Texture coordinates to a white pixel
ImVector<ImFont*>Fonts;// Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
//-------------------------------------------
// Custom Rectangles
//-------------------------------------------
// [Private] User rectangle for packing custom texture data into the atlas.
structCustomRect
@ -1422,10 +1418,24 @@ struct ImFontAtlas
boolIsPacked()const{returnX!=0xFFFF;}
};
// [Private] Members
//-------------------------------------------
// Members
//-------------------------------------------
ImTextureIDTexID;// User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
intTexDesiredWidth;// Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
intTexGlyphPadding;// Padding between glyphs within texture in pixels. Defaults to 1.
// [Private]
// NB: Access texture data via GetTexData*() calls! Which will setup a default font for you.
unsignedchar*TexPixelsAlpha8;// 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
unsignedint*TexPixelsRGBA32;// 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
intTexWidth;// Texture width calculated during Build().
intTexHeight;// Texture height calculated during Build().
ImVec2TexUvWhitePixel;// Texture coordinates to a white pixel
ImVector<ImFont*>Fonts;// Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
ImVector<CustomRect>CustomRects;// Rectangles for packing custom texture data into the atlas.
ImVector<ImFontConfig>ConfigData;// Internal data
IMGUI_APIboolBuild();// Build pixels data. This is automatically for you by the GetTexData*** functions.