MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / updateCharacter

Method updateCharacter

Source/Cache/FontCache.cpp:316–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316const bgfx::GlyphInfo* FontCache::updateCharacter(Sprite* sp, Font* font, bgfx::CodePoint character) {
317 const bgfx::GlyphInfo* glyphInfo = SharedFontManager.getGlyphInfo(font->getHandle(), character);
318 bgfx::Atlas* atlas = glyphInfo->atlas;
319 const bgfx::AtlasRegion& region = atlas->getRegion(glyphInfo->regionIndex);
320 sp->setTexture(atlas->getTexture());
321 sp->setTextureRect(Rect(region.x, region.y, region.width, region.height));
322 sp->setSize(sp->getTextureRect().size);
323 return glyphInfo;
324}
325
326NS_DORA_END

Callers 1

updateCharactersMethod · 0.80

Calls 8

RectClass · 0.70
getGlyphInfoMethod · 0.45
getHandleMethod · 0.45
getRegionMethod · 0.45
setTextureMethod · 0.45
getTextureMethod · 0.45
setTextureRectMethod · 0.45
setSizeMethod · 0.45

Tested by

no test coverage detected