Skip to content

Commit 2e7a9be

Browse files
committedJan 7, 2021
No need to translate in X direction
1 parent 6570e8f commit 2e7a9be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎Sources/MacOSAppSupport/MAS_NSViewOffscreenContext.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151
CGContextRef ctx = (CGContextRef) cgContext;
5252
if (ctx != nil) {
5353
if (orientation == Orientation::FlippedVertically) {
54-
CGContextTranslateCTM (ctx, 1.0, height);
54+
CGContextTranslateCTM (ctx, 0.0, height);
5555
CGContextScaleCTM (ctx, 1.0, -1.0);
5656
}
5757
CGRect imgRect = CGRectMake (0, 0, width, height);
5858
CGImageRef cgImage = [image CGImageForProposedRect: &imgRect context: [NSGraphicsContext currentContext] hints: nil];
5959
CGContextDrawImage (ctx, imgRect, cgImage);
6060
if (orientation == Orientation::FlippedVertically) {
6161
CGContextScaleCTM (ctx, 1.0, -1.0);
62-
CGContextTranslateCTM (ctx, 1.0, -height);
62+
CGContextTranslateCTM (ctx, 0.0, -height);
6363
}
6464
}
6565
}

0 commit comments

Comments
 (0)
Please sign in to comment.