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

Added some assertions, fixed a win32 mouse mouse cursor problem, tweaked PopupMenu::showAt().

This commit is contained in:
Julian Storer 2010-11-26 12:57:24 +00:00
parent 081744b177
commit 645637ab09
14 changed files with 135 additions and 119 deletions

View file

@ -1197,6 +1197,10 @@ bool Component::isTransformed() const throw()
void Component::setTransform (const AffineTransform& newTransform)
{
// If you pass in a transform with no inverse, the component will have no dimensions,
// and there will be all sorts of maths errors when converting coordinates.
jassert (! newTransform.isSingularity());
if (newTransform.isIdentity())
{
if (affineTransform_ != 0)
@ -1204,6 +1208,8 @@ void Component::setTransform (const AffineTransform& newTransform)
repaint();
affineTransform_ = 0;
repaint();
sendMovedResizedMessages (false, false);
}
}
else if (affineTransform_ == 0)
@ -1211,12 +1217,14 @@ void Component::setTransform (const AffineTransform& newTransform)
repaint();
affineTransform_ = new AffineTransform (newTransform);
repaint();
sendMovedResizedMessages (false, false);
}
else if (*affineTransform_ != newTransform)
{
repaint();
*affineTransform_ = newTransform;
repaint();
sendMovedResizedMessages (false, false);
}
}
@ -2064,6 +2072,12 @@ const Rectangle<int> Component::getLocalBounds() const throw()
return Rectangle<int> (getWidth(), getHeight());
}
const Rectangle<int> Component::getBoundsInParent() const throw()
{
return affineTransform_ == 0 ? bounds_
: bounds_.toFloat().transformed (*affineTransform_).getSmallestIntegerContainer();
}
void Component::getVisibleArea (RectangleList& result, const bool includeSiblings) const
{
result.clear();