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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user