MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / draw

Method draw

3ds/source/textpool.cpp:169–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169float TextPool::draw(const std::string& s, float x, float y, float scale, u32 color, float depth)
170{
171 const C2D_Text* t = obtain(s, nullptr);
172 // Snap the pen to whole pixels: the system font is a bitmap atlas, so
173 // fractional origins smear glyph edges across two texels and read as blurry.
174 C2D_DrawText(t, C2D_WithColor, floorf(x + 0.5f), floorf(y + 0.5f), depth, scale, scale, color);
175 return StringUtils::textWidth(*t, scale);
176}
177
178void TextPool::drawCentered(const std::string& s, float x, float w, float y, float scale, u32 color, float depth)
179{

Callers 15

drawProgressBarMethod · 0.45
drawBottomMethod · 0.45
drawBodyMethod · 0.45
drawRowMethod · 0.45
uiFrameMethod · 0.45
barMethod · 0.45
drawBottomMethod · 0.45
drawToggleRowMethod · 0.45
drawValueRowMethod · 0.45
drawListRowMethod · 0.45
drawEmptyStateMethod · 0.45
drawTopMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected