aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2020-02-14 20:08:40 +0000
committerAlan Third2020-02-19 11:07:44 +0000
commit1a75e8b7e0d3159dea43c11748e0492ee4d3d929 (patch)
tree6e083df463bbc1cce8ee930fdc0aea0b8254bb21 /src
parent52dbd70f0ed6896c3524d14834b489cef8584ada (diff)
downloademacs-1a75e8b7e0d3159dea43c11748e0492ee4d3d929.tar.gz
emacs-1a75e8b7e0d3159dea43c11748e0492ee4d3d929.zip
Fix horizontal bit shifting
* src/nsterm.m ([EmacsView copyRect:to:]): Calculate the horizontal difference instead of just the vertical. ([EmacsView updateLayer]): Fix NSTRACE message.
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 2cf6774a1f1..f31ba5de896 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8295,8 +8295,9 @@ not_in_argv (NSString *arg)
8295 offset the top left so when we draw back into the buffer the 8295 offset the top left so when we draw back into the buffer the
8296 correct part of the image is drawn. */ 8296 correct part of the image is drawn. */
8297 CGContextScaleCTM(drawingBuffer, 1, -1); 8297 CGContextScaleCTM(drawingBuffer, 1, -1);
8298 CGContextTranslateCTM(drawingBuffer, 0, -NSHeight (frame) 8298 CGContextTranslateCTM(drawingBuffer,
8299 - (NSMinY (dstRect) - NSMinY (srcRect))); 8299 NSMinX (dstRect) - NSMinX (srcRect),
8300 -NSHeight (frame) - (NSMinY (dstRect) - NSMinY (srcRect)));
8300 8301
8301 /* Take a copy of the buffer and then draw it back to the buffer, 8302 /* Take a copy of the buffer and then draw it back to the buffer,
8302 limited by the clipping rectangle. */ 8303 limited by the clipping rectangle. */
@@ -8328,7 +8329,7 @@ not_in_argv (NSString *arg)
8328 8329
8329- (void)updateLayer 8330- (void)updateLayer
8330{ 8331{
8331 NSTRACE ("EmacsView updateLayer]"); 8332 NSTRACE ("[EmacsView updateLayer]");
8332 8333
8333 CGImageRef contentsImage = CGBitmapContextCreateImage(drawingBuffer); 8334 CGImageRef contentsImage = CGBitmapContextCreateImage(drawingBuffer);
8334 [[self layer] setContents:(id)contentsImage]; 8335 [[self layer] setContents:(id)contentsImage];