MCPcopy Create free account
hub / github.com/cinder/Cinder / drawString

Method drawString

src/cinder/gl/TextureFont.cpp:711–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709}
710
711void TextureFont::drawString( const std::string &str, const vec2 &baseline, const DrawOptions &options )
712{
713 TextBox tbox = TextBox().font( mFont ).text( str ).size( TextBox::GROW, TextBox::GROW ).ligate( options.getLigate() );
714#if defined( CINDER_ANDROID ) || defined( CINDER_LINUX )
715 vector<pair<Font::Glyph,vec2> > glyphMeasures = tbox.measureGlyphs( getCachedGlyphMetrics() );
716#else
717 vector<pair<Font::Glyph,vec2> > glyphMeasures = tbox.measureGlyphs();
718#endif
719 drawGlyphs( glyphMeasures, baseline, options );
720}
721
722void TextureFont::drawString( const std::string &str, const Rectf &fitRect, const vec2 &offset, const DrawOptions &options )
723{

Callers 8

drawMethod · 0.80
drawMethod · 0.80
drawMethod · 0.80
drawMethod · 0.80
drawMethod · 0.80
drawMethod · 0.80
drawLabelsMethod · 0.80
drawMethod · 0.80

Calls 5

TextBoxFunction · 0.85
getCachedGlyphMetricsFunction · 0.85
measureGlyphsMethod · 0.80
sizeMethod · 0.45
getHeightMethod · 0.45

Tested by 1

drawMethod · 0.64