emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1a75e8b 1/2: Fix horizontal bit shifting


From: Alan Third
Subject: master 1a75e8b 1/2: Fix horizontal bit shifting
Date: Wed, 19 Feb 2020 06:13:39 -0500 (EST)

branch: master
commit 1a75e8b7e0d3159dea43c11748e0492ee4d3d929
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>

    Fix horizontal bit shifting
    
    * src/nsterm.m ([EmacsView copyRect:to:]): Calculate the horizontal
    difference instead of just the vertical.
    ([EmacsView updateLayer]): Fix NSTRACE message.
---
 src/nsterm.m | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 2cf6774..f31ba5d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8295,8 +8295,9 @@ not_in_argv (NSString *arg)
      offset the top left so when we draw back into the buffer the
      correct part of the image is drawn.  */
   CGContextScaleCTM(drawingBuffer, 1, -1);
-  CGContextTranslateCTM(drawingBuffer, 0, -NSHeight (frame)
-                        - (NSMinY (dstRect) - NSMinY (srcRect)));
+  CGContextTranslateCTM(drawingBuffer,
+                        NSMinX (dstRect) - NSMinX (srcRect),
+                        -NSHeight (frame) - (NSMinY (dstRect) - NSMinY 
(srcRect)));
 
   /* Take a copy of the buffer and then draw it back to the buffer,
      limited by the clipping rectangle.  */
@@ -8328,7 +8329,7 @@ not_in_argv (NSString *arg)
 
 - (void)updateLayer
 {
-  NSTRACE ("EmacsView updateLayer]");
+  NSTRACE ("[EmacsView updateLayer]");
 
   CGImageRef contentsImage = CGBitmapContextCreateImage(drawingBuffer);
   [[self layer] setContents:(id)contentsImage];



reply via email to

[Prev in Thread] Current Thread [Next in Thread]