From 514ac22d6d3724d52d1309a9db90d2fbe244ed45 Mon Sep 17 00:00:00 2001 From: Anthony Nicholls Date: Wed, 21 Aug 2024 14:37:31 +0100 Subject: [PATCH] macOS: Prevent an image mask from filling outside the clipping bounds --- modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm b/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm index 27e24f14c0..02cedb0f11 100644 --- a/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm +++ b/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm @@ -384,6 +384,7 @@ void CoreGraphicsContext::clipToImageAlpha (const Image& sourceImage, const Affi auto r = convertToCGRect (sourceImage.getBounds()); CGContextClipToMask (context.get(), r, image.get()); + CGContextClipToRect (context.get(), r); applyTransform (t.inverted()); flip();