From 7a78176183b92284c65c25b6f9b11f09ea355670 Mon Sep 17 00:00:00 2001 From: Marco Wende Date: Wed, 1 Jul 2026 18:42:12 +0200 Subject: [PATCH] Fix flipped image in editor canvas Use respectFlipped: true when drawing NSImage so it renders correctly in the flipped NSView coordinate system. Co-Authored-By: Claude Opus 4.6 --- Sources/Editor/AnnotationCanvasView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Editor/AnnotationCanvasView.swift b/Sources/Editor/AnnotationCanvasView.swift index e582005..476d661 100644 --- a/Sources/Editor/AnnotationCanvasView.swift +++ b/Sources/Editor/AnnotationCanvasView.swift @@ -77,7 +77,7 @@ final class AnnotationCanvasView: NSView { let imgRect = imageRect NSGraphicsContext.current?.imageInterpolation = .high - image.draw(in: imgRect, from: .zero, operation: .sourceOver, fraction: 1) + image.draw(in: imgRect, from: .zero, operation: .sourceOver, fraction: 1, respectFlipped: true, hints: nil) context.saveGState() context.translateBy(x: imgRect.origin.x, y: imgRect.origin.y)