MCPcopy Create free account
hub / github.com/Raais/ImStudio / ClearInputData

Method ClearInputData

src/third-party/imgui/imgui_draw.cpp:1988–2009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1986}
1987
1988void ImFontAtlas::ClearInputData()
1989{
1990 IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
1991 for (int i = 0; i < ConfigData.Size; i++)
1992 if (ConfigData[i].FontData && ConfigData[i].FontDataOwnedByAtlas)
1993 {
1994 IM_FREE(ConfigData[i].FontData);
1995 ConfigData[i].FontData = NULL;
1996 }
1997
1998 // When clearing this we lose access to the font name and other information used to build the font.
1999 for (int i = 0; i < Fonts.Size; i++)
2000 if (Fonts[i]->ConfigData >= ConfigData.Data && Fonts[i]->ConfigData < ConfigData.Data + ConfigData.Size)
2001 {
2002 Fonts[i]->ConfigData = NULL;
2003 Fonts[i]->ConfigDataCount = 0;
2004 }
2005 ConfigData.clear();
2006 CustomRects.clear();
2007 PackIdMouseCursors = PackIdLines = -1;
2008 // Important: we leave TexReady untouched
2009}
2010
2011void ImFontAtlas::ClearTexData()
2012{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected