1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

OpenGL: Use width and height when calculating transform

This commit is contained in:
ed 2019-01-23 09:09:10 +00:00
parent cdd8f2b78a
commit 853ec552f1

View file

@ -293,8 +293,8 @@ public:
{
scale = newScale;
viewportArea = newArea;
transform = AffineTransform::scale ((float) newArea.getRight() / (float) localBounds.getRight(),
(float) newArea.getBottom() / (float) localBounds.getBottom());
transform = AffineTransform::scale ((float) newArea.getWidth() / (float) localBounds.getWidth(),
(float) newArea.getHeight() / (float) localBounds.getHeight());
if (canTriggerUpdate)
invalidateAll();