OSDN Git Service

In Term_pict_cocoa(), update the destination rectangle if more than one tile is drawn...
authorEric Branlund <ebranlund@fastmail.com>
Tue, 3 Sep 2019 20:24:54 +0000 (13:24 -0700)
committerEric Branlund <ebranlund@fastmail.com>
Tue, 3 Sep 2019 20:24:54 +0000 (13:24 -0700)
src/main-cocoa.m

index 3057419..fad26ec 100644 (file)
@@ -2232,14 +2232,8 @@ static errr Term_pict_cocoa(int x, int y, int n, TERM_COLOR *ap,
     /* Lock focus */
     [angbandContext lockFocus];
     
-    NSRect destinationRect = [angbandContext rectInImageForTileAtX:x Y:y];
-
-    /* Expand the rect to every touching pixel to figure out what to redisplay
-        */
-    NSRect redisplayRect = crack_rect(destinationRect, AngbandScaleIdentity, PUSH_RIGHT | PUSH_TOP | PUSH_BOTTOM | PUSH_LEFT);
-    
-    /* Expand our destinationRect */
-    destinationRect = crack_rect(destinationRect, AngbandScaleIdentity, push_options(x, y));
+    NSRect redisplayRect = [angbandContext rectInImageForTileAtX:x Y:y];
+    redisplayRect.size.width = angbandContext->tileSize.width * n;
     
     /* Scan the input */
     int i;
@@ -2248,7 +2242,8 @@ static errr Term_pict_cocoa(int x, int y, int n, TERM_COLOR *ap,
 
     for (i = 0; i < n; i++)
     {
-        
+       NSRect destinationRect =
+           [angbandContext rectInImageForTileAtX:x+i Y:y];
         TERM_COLOR a = *ap++;
         char c = *cp++;