1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00

Added some new versions of Graphics::drawText and drawFittedText that take Rectangle parameters.

This commit is contained in:
jules 2012-07-14 11:54:29 +01:00
parent 006e324114
commit dc9e0cb9bb
16 changed files with 87 additions and 56 deletions

View file

@ -334,9 +334,7 @@ public:
g.setColour (Colours::black);
g.setFont (font);
g.drawFittedText (getName(),
x + 4, y + 2, w - 8, h - 4,
Justification::centred, 2);
g.drawFittedText (getName(), getLocalBounds().reduced (4, 2), Justification::centred, 2);
g.setColour (Colours::grey);
g.drawRect (x, y, w, h);