// // Generated by Brutal.ImGui.Generator; do not edit by hand. #nullable enable namespace Brutal.ImGuiApi { public static partial class ImFontAtlasExtensions { /// /// /// C++: /// imgui.h:3726 /// , /// imgui_draw.cpp:3006 ///
ImFont* AddFont(const ImFontConfig* font_cfg) ///
///
/// /// /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: /// - One or more fonts. /// - Custom graphics data needed to render the shapes needed by Dear ImGui. /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. /// It is the rendering backend responsibility to upload texture into your graphics API: /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. /// - Backend then set ImTextureData's TexID and BackendUserData. /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. /// Legacy path: /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. /// Common pitfalls: /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! /// /// public static unsafe ImFontPtr AddFont(this ImFontAtlasPtr target, ImFontConfigPtr fontCfg) => PInvoke.ImFontAtlas_AddFont(target, fontCfg); /// /// /// C++: /// imgui.h:3727 /// , /// imgui_draw.cpp:3105 ///
ImFont* AddFontDefault(const ImFontConfig* font_cfg = NULL) ///
///
/// /// /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: /// - One or more fonts. /// - Custom graphics data needed to render the shapes needed by Dear ImGui. /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. /// It is the rendering backend responsibility to upload texture into your graphics API: /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. /// - Backend then set ImTextureData's TexID and BackendUserData. /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. /// Legacy path: /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. /// Common pitfalls: /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! /// /// /// Load embedded ProggyClean.ttf at size 13, disable oversampling /// /// public static unsafe ImFontPtr AddFontDefault(this ImFontAtlasPtr target, ImFontConfigPtr fontCfg = default) => PInvoke.ImFontAtlas_AddFontDefault(target, fontCfg); /// /// /// C++: /// imgui.h:3728 /// , /// imgui_draw.cpp:3133 ///
/// ImFont* AddFontFromFileTTF(const char* filename, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) ///
///
/// /// /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: /// - One or more fonts. /// - Custom graphics data needed to render the shapes needed by Dear ImGui. /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. /// It is the rendering backend responsibility to upload texture into your graphics API: /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. /// - Backend then set ImTextureData's TexID and BackendUserData. /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. /// Legacy path: /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. /// Common pitfalls: /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! /// /// public static unsafe ImFontPtr AddFontFromFileTTF( this ImFontAtlasPtr target, ImString filename, float sizePixels = 0f, ImFontConfigPtr fontCfg = default, ReadOnlySpan glyphRanges = default ) { fixed (uint* glyphRanges_fixed = glyphRanges) { fixed (byte* filename_fixed = filename) { return PInvoke.ImFontAtlas_AddFontFromFileTTF( target, filename_fixed, sizePixels, fontCfg, glyphRanges_fixed ); } } } /// /// /// Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas. /// Set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed. /// /// /// C++: /// imgui.h:3729 /// , /// imgui_draw.cpp:3159 ///
/// ImFont* AddFontFromMemoryTTF(void* font_data, int font_data_size, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) ///
///
/// /// /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: /// - One or more fonts. /// - Custom graphics data needed to render the shapes needed by Dear ImGui. /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. /// It is the rendering backend responsibility to upload texture into your graphics API: /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. /// - Backend then set ImTextureData's TexID and BackendUserData. /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. /// Legacy path: /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. /// Common pitfalls: /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! /// /// /// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas /// == false. Owned TTF buffer will be deleted after Build(). /// /// public static unsafe ImFontPtr AddFontFromMemoryTTF( this ImFontAtlasPtr target, Ptr fontData, int fontDataSize, float sizePixels = 0f, ImFontConfigPtr fontCfg = default, ReadOnlySpan glyphRanges = default ) { fixed (uint* glyphRanges_fixed = glyphRanges) { return PInvoke.ImFontAtlas_AddFontFromMemoryTTF( target, fontData, fontDataSize, sizePixels, fontCfg, glyphRanges_fixed ); } } /// /// /// 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp. /// /// /// C++: /// imgui.h:3730 /// , /// imgui_draw.cpp:3173 ///
/// ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_font_data, int compressed_font_data_size, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) ///
///
/// /// /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: /// - One or more fonts. /// - Custom graphics data needed to render the shapes needed by Dear ImGui. /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. /// It is the rendering backend responsibility to upload texture into your graphics API: /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. /// - Backend then set ImTextureData's TexID and BackendUserData. /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. /// Legacy path: /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. /// Common pitfalls: /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! /// /// public static unsafe ImFontPtr AddFontFromMemoryCompressedTTF( this ImFontAtlasPtr target, Ptr compressedFontData, int compressedFontDataSize, float sizePixels = 0f, ImFontConfigPtr fontCfg = default, ReadOnlySpan glyphRanges = default ) { fixed (uint* glyphRanges_fixed = glyphRanges) { return PInvoke.ImFontAtlas_AddFontFromMemoryCompressedTTF( target, compressedFontData, compressedFontDataSize, sizePixels, fontCfg, glyphRanges_fixed ); } } /// /// /// 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with /// -base85 parameter. /// /// /// C++: /// imgui.h:3731 /// , /// imgui_draw.cpp:3185 ///
/// ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_font_data_base85, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) ///
///
/// /// /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: /// - One or more fonts. /// - Custom graphics data needed to render the shapes needed by Dear ImGui. /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. /// It is the rendering backend responsibility to upload texture into your graphics API: /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. /// - Backend then set ImTextureData's TexID and BackendUserData. /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. /// Legacy path: /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. /// Common pitfalls: /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! /// /// public static unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF( this ImFontAtlasPtr target, ReadOnlySpan compressedFontDataBase85, float sizePixels = 0f, ImFontConfigPtr fontCfg = default, ReadOnlySpan glyphRanges = default ) { fixed (uint* glyphRanges_fixed = glyphRanges) { fixed (byte* compressedFontDataBase85_fixed = compressedFontDataBase85) { return PInvoke.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF( target, compressedFontDataBase85_fixed, sizePixels, fontCfg, glyphRanges_fixed ); } } } /// /// /// C++: /// imgui.h:3732 /// , /// imgui_draw.cpp:3224 ///
void RemoveFont(ImFont* font) ///
///
/// /// /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: /// - One or more fonts. /// - Custom graphics data needed to render the shapes needed by Dear ImGui. /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. /// It is the rendering backend responsibility to upload texture into your graphics API: /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. /// - Backend then set ImTextureData's TexID and BackendUserData. /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. /// Legacy path: /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. /// Common pitfalls: /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! /// /// public static unsafe void RemoveFont(this ImFontAtlasPtr target, ImFontPtr font) => PInvoke.ImFontAtlas_RemoveFont(target, font); /// /// /// Clear everything (input fonts, output glyphs/textures) /// /// /// C++: /// imgui.h:3734 /// , /// imgui_draw.cpp:2657 ///
void Clear() ///
///
public static unsafe void Clear(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_Clear(target); /// /// /// Compact cached glyphs and texture. /// /// /// C++: /// imgui.h:3735 /// , /// imgui_draw.cpp:2666 ///
void CompactCache() ///
///
public static unsafe void CompactCache(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_CompactCache(target); /// /// /// Change font loader at runtime. /// /// /// C++: /// imgui.h:3736 /// , /// imgui_draw.cpp:2671 ///
void SetFontLoader(const ImFontLoader* font_loader) ///
///
public static unsafe void SetFontLoader(this ImFontAtlasPtr target, ImFontLoaderPtr fontLoader) => PInvoke.ImFontAtlas_SetFontLoader(target, fontLoader); /// /// /// [OBSOLETE] Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) /// = all the data used to build the texture and fonts. /// /// /// C++: /// imgui.h:3739 /// , /// imgui_draw.cpp:2676 ///
void ClearInputData() ///
///
/// /// /// As we are transitioning toward a new font system, we expect to obsolete those soon: /// /// public static unsafe void ClearInputData(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_ClearInputData(target); /// /// /// [OBSOLETE] Clear input+output font data (same as ClearInputData() + glyphs storage, UV coordinates). /// /// /// C++: /// imgui.h:3740 /// , /// imgui_draw.cpp:2703 ///
void ClearFonts() ///
///
/// /// /// As we are transitioning toward a new font system, we expect to obsolete those soon: /// /// public static unsafe void ClearFonts(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_ClearFonts(target); /// /// /// [OBSOLETE] Clear CPU-side copy of the texture data. Saves RAM once the texture has been copied to /// graphics memory. /// /// /// C++: /// imgui.h:3741 /// , /// imgui_draw.cpp:2694 ///
void ClearTexData() ///
///
/// /// /// As we are transitioning toward a new font system, we expect to obsolete those soon: /// /// /// Clear CPU-side copy of the texture data. /// /// public static unsafe void ClearTexData(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_ClearTexData(target); /// /// /// Basic Latin, Extended Latin /// /// /// C++: /// imgui.h:3765 /// , /// imgui_draw.cpp:4753 ///
const ImWchar* GetGlyphRangesDefault() ///
///
/// /// /// Since 1.92: specifying glyph ranges is only useful/necessary if your backend doesn't support /// ImGuiBackendFlags_RendererHasTextures! /// /// /// Retrieve list of range (2 int per range, values are inclusive) /// /// public static unsafe Ptr GetGlyphRangesDefault(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_GetGlyphRangesDefault(target); /// /// /// Register a rectangle. Return -1 (ImFontAtlasRectId_Invalid) on error. /// /// /// C++: /// imgui.h:3802 /// , /// imgui_draw.cpp:3251 ///
ImFontAtlasRectId AddCustomRect(int width, int height, ImFontAtlasRect* out_r = NULL) ///
///
/// /// /// Register and retrieve custom rectangles /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. /// - VERY IMPORTANT: /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. /// - Read docs/FONTS.md for more details about using colorful icons. /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. /// - (Pre-1.92 names) ------------> (1.92 names) /// - GetCustomRectByIndex() --> Use GetCustomRect() /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. /// - AddCustomRectRegular() --> Renamed to AddCustomRect() /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect /// /// /// At it is common to do an AddCustomRect() followed by a GetCustomRect(), we provide an optional /// 'ImFontAtlasRect* out_r = NULL' argument to retrieve the info straight away. /// /// public static unsafe ImFontAtlasRectId AddCustomRect( this ImFontAtlasPtr target, int width, int height, ImFontAtlasRectPtr outR = default ) => PInvoke.ImFontAtlas_AddCustomRect(target, width, height, outR); /// /// /// Unregister a rectangle. Existing pixels will stay in texture until resized / garbage collected. /// /// /// C++: /// imgui.h:3803 /// , /// imgui_draw.cpp:3273 ///
void RemoveCustomRect(ImFontAtlasRectId id) ///
///
/// /// /// Register and retrieve custom rectangles /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. /// - VERY IMPORTANT: /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. /// - Read docs/FONTS.md for more details about using colorful icons. /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. /// - (Pre-1.92 names) ------------> (1.92 names) /// - GetCustomRectByIndex() --> Use GetCustomRect() /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. /// - AddCustomRectRegular() --> Renamed to AddCustomRect() /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect /// /// public static unsafe void RemoveCustomRect(this ImFontAtlasPtr target, ImFontAtlasRectId id) => PInvoke.ImFontAtlas_RemoveCustomRect(target, id); /// /// /// Get rectangle coordinates for current texture. Valid immediately, never store this (read above)! /// /// /// C++: /// imgui.h:3804 /// , /// imgui_draw.cpp:3330 ///
bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const ///
///
/// /// /// Register and retrieve custom rectangles /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. /// - VERY IMPORTANT: /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. /// - Read docs/FONTS.md for more details about using colorful icons. /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. /// - (Pre-1.92 names) ------------> (1.92 names) /// - GetCustomRectByIndex() --> Use GetCustomRect() /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. /// - AddCustomRectRegular() --> Renamed to AddCustomRect() /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect /// /// public static unsafe bool GetCustomRect( this ImFontAtlasPtr target, ImFontAtlasRectId id, out ImFontAtlasRect outR ) { fixed (ImFontAtlasRect* outR_fixed = &outR) { return PInvoke.ImFontAtlas_GetCustomRect(target, id, outR_fixed); } } /// /// /// Get rectangle coordinates for current texture. Valid immediately, never store this (read above)! /// /// /// C++: /// imgui.h:3804 /// , /// imgui_draw.cpp:3330 ///
bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const ///
///
/// /// /// Register and retrieve custom rectangles /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. /// - VERY IMPORTANT: /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. /// - Read docs/FONTS.md for more details about using colorful icons. /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. /// - (Pre-1.92 names) ------------> (1.92 names) /// - GetCustomRectByIndex() --> Use GetCustomRect() /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. /// - AddCustomRectRegular() --> Renamed to AddCustomRect() /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect /// /// public static unsafe bool GetCustomRect(this ImFontAtlasPtr target, ImFontAtlasRectId id) => PInvoke.ImFontAtlas_GetCustomRect(target, id, null); } }