Docs: Update outdated code sample (#5766)

This commit is contained in:
thedemons 2022-10-11 22:45:27 +07:00 committed by GitHub
parent c54230d14e
commit 5196bd15e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -277,8 +277,8 @@ io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_width, &tex_height);
for (int rect_n = 0; rect_n < IM_ARRAYSIZE(rect_ids); rect_n++) for (int rect_n = 0; rect_n < IM_ARRAYSIZE(rect_ids); rect_n++)
{ {
int rect_id = rects_ids[rect_n]; int rect_id = rect_ids[rect_n];
if (const ImFontAtlas::CustomRect* rect = io.Fonts->GetCustomRectByIndex(rect_id)) if (const ImFontAtlasCustomRect* rect = io.Fonts->GetCustomRectByIndex(rect_id))
{ {
// Fill the custom rectangle with red pixels (in reality you would draw/copy your bitmap data here!) // Fill the custom rectangle with red pixels (in reality you would draw/copy your bitmap data here!)
for (int y = 0; y < rect->Height; y++) for (int y = 0; y < rect->Height; y++)