Browse Source

OpenGL: Use width and height when calculating transform

tags/2021-05-28
ed 6 years ago
parent
commit
853ec552f1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_opengl/opengl/juce_OpenGLContext.cpp

+ 2
- 2
modules/juce_opengl/opengl/juce_OpenGLContext.cpp 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();


Loading…
Cancel
Save