MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / drawString

Method drawString

src/ui/graphics.cpp:211–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void Graphics::drawString(const std::string& str, gfx::Color fg, gfx::Color bg, const gfx::Point& ptOrig)
212{
213 gfx::Point pt(m_dx+ptOrig.x, m_dy+ptOrig.y);
214 dirty(gfx::Rect(pt.x, pt.y, m_font->textLength(str), m_font->height()));
215
216 she::SurfaceLock lock(m_surface);
217 m_surface->drawString(m_font.get(), fg, bg, pt.x, pt.y, str);
218}
219
220void Graphics::drawUIString(const std::string& str, gfx::Color fg, gfx::Color bg, const gfx::Point& pt,
221 bool drawUnderscore)

Callers 6

onPaintMethod · 0.45
onPaintMethod · 0.45
onPaintMethod · 0.45
onPaintMethod · 0.45
onPaintMethod · 0.45
drawFrameTagsMethod · 0.45

Calls 3

textLengthMethod · 0.45
heightMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected