1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00

The Point and Rectangle classes are now templated, so can be used for either float or int co-ordinates. This means that wherever you've used these classes, you'll need to replace them with Rectangle<int> or Point<float> in your code. A couple of methods in Path have changed to take advantage of the new ability.

This commit is contained in:
Julian Storer 2010-02-07 00:52:30 +00:00
parent 31a102008d
commit 7bc24ae42a
153 changed files with 2258 additions and 2753 deletions

View file

@ -65,11 +65,13 @@ void DrawableText::render (const Drawable::RenderingContext& context) const
text.draw (context.g, context.transform);
}
void DrawableText::getBounds (float& x, float& y, float& width, float& height) const
const Rectangle<float> DrawableText::getBounds() const
{
text.getBoundingBox (0, -1, x, y, width, height, false); // (really returns top, left, bottom, right)
width -= x;
height -= y;
float x, y, w, h;
text.getBoundingBox (0, -1, x, y, w, h, false); // (really returns top, left, bottom, right)
w -= x;
h -= y;
return Rectangle<float> (x, y, w, h);
}
bool DrawableText::hitTest (float x, float y) const