Browse Source

Fix for CoreGraphics clipping to zero-winding paths

tags/2021-05-28
jules 7 years ago
parent
commit
fb43fbb37f
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm

+ 6
- 1
modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm View File

@@ -274,7 +274,12 @@ void CoreGraphicsContext::excludeClipRectangle (const Rectangle<int>& r)
void CoreGraphicsContext::clipToPath (const Path& path, const AffineTransform& transform)
{
createPath (path, transform);
CGContextClip (context);
if (path.isUsingNonZeroWinding())
CGContextClip (context);
else
CGContextEOClip (context);
lastClipRectIsValid = false;
}


Loading…
Cancel
Save