diff --git a/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp b/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp index 363c99f01c..f1f057a397 100644 --- a/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp +++ b/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp @@ -432,24 +432,22 @@ void Direct2DGraphicsContext::excludeClipRectangle (const Rectangle& userSp if (transform.isOnlyTranslated) { // Just a translation; pre-translate the exclusion area - auto translatedR = transform.translated (userSpaceExcludedRectangle.toFloat()).getLargestIntegerWithin().toFloat(); + const auto translatedR = transform.translated (userSpaceExcludedRectangle.toFloat()) + .getLargestIntegerWithin() + .toFloat(); - if (! translatedR.contains (frameSize)) - { - deviceSpaceClipList.subtract (translatedR); - pendingClipList.subtract (translatedR); - } + deviceSpaceClipList.subtract (translatedR); + pendingClipList.subtract (translatedR); } else if (currentState->isCurrentTransformAxisAligned()) { // Just a scale + translation; pre-transform the exclusion area - auto transformedR = transform.boundsAfterTransform (userSpaceExcludedRectangle.toFloat()).getLargestIntegerWithin().toFloat(); + const auto transformedR = transform.boundsAfterTransform (userSpaceExcludedRectangle.toFloat()) + .getLargestIntegerWithin() + .toFloat(); - if (! transformedR.contains (frameSize)) - { - deviceSpaceClipList.subtract (transformedR); - pendingClipList.subtract (transformedR); - } + deviceSpaceClipList.subtract (transformedR); + pendingClipList.subtract (transformedR); } else {