Cocoa: fix the issues related to Canvas Clipping, especially on version < macOS 11

This commit is contained in:
rich2014 2024-07-02 20:21:48 +08:00
parent d0d80cf295
commit fdbb1e6aa3

View File

@ -1436,10 +1436,12 @@ begin
FBkBrush.Free;
if Assigned(ctx) then begin
if Assigned(CGContext()) and Flipped then
if Clipped then
CGContextRestoreGState(CGContext());
if Flipped then
CGContextRestoreGState(CGContext());
ctx.release;
end;
end;
if Assigned(boxview) then boxview.release;
inherited Destroy;
end;