void Graphics::drawText (const String& text, const Rectangle<float>& area, Justification justificationType, bool useEllipsesIfTooBig) const { if (text.isNotEmpty() && context.clipRegionIntersects (area.getSmallestIntegerContainer())) { GlyphArrangement arr; arr.addCurtailedLineOfText (context.getFont(), text, 0.0f, 0.0f, area.getWidth(), useEllipsesIfTooBig); arr.justifyGlyphs (0, arr.getNumGlyphs(), area.getX(), area.getY(), area.getWidth(), area.getHeight(), justificationType); arr.draw (*this); } }
void Graphics::drawText (const String& text, const int x, const int y, const int width, const int height, const Justification& justificationType, const bool useEllipsesIfTooBig) const { if (text.isNotEmpty() && context->clipRegionIntersects (Rectangle<int> (x, y, width, height))) { GlyphArrangement arr; arr.addCurtailedLineOfText (context->getFont(), text, 0.0f, 0.0f, (float) width, useEllipsesIfTooBig); arr.justifyGlyphs (0, arr.getNumGlyphs(), (float) x, (float) y, (float) width, (float) height, justificationType); arr.draw (*this); } }