MCPcopy Create free account
hub / github.com/cinder/Cinder / ImFontAtlasPackReuseRectEntry

Function ImFontAtlasPackReuseRectEntry

src/imgui/imgui_draw.cpp:4273–4279  ·  view source on GitHub ↗

Overwrite existing entry

Source from the content-addressed store, hash-verified

4271
4272// Overwrite existing entry
4273static ImFontAtlasRectId ImFontAtlasPackReuseRectEntry(ImFontAtlas* atlas, ImFontAtlasRectEntry* index_entry)
4274{
4275 IM_ASSERT(index_entry->IsUsed);
4276 index_entry->TargetIndex = atlas->Builder->Rects.Size - 1;
4277 int index_idx = atlas->Builder->RectsIndex.index_from_ptr(index_entry);
4278 return ImFontAtlasRectId_Make(index_idx, index_entry->Generation);
4279}
4280
4281// This is expected to be called in batches and followed by a repack
4282void ImFontAtlasPackDiscardRect(ImFontAtlas* atlas, ImFontAtlasRectId id)

Callers 1

ImFontAtlasPackAddRectFunction · 0.85

Calls 1

ImFontAtlasRectId_MakeFunction · 0.85

Tested by

no test coverage detected