From 7bdba0898d944c1a70c10306bded515b35dd0106 Mon Sep 17 00:00:00 2001 From: Eric Branlund Date: Tue, 3 Sep 2019 13:24:54 -0700 Subject: [PATCH] In Term_pict_cocoa(), update the destination rectangle if more than one tile is drawn. Removed rounding of the destination rectangle borders since the tile size has been rounded already. Set the bounding rectangle for the changed area to encompass the full range drawn and not just the first tile. --- src/main-cocoa.m | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main-cocoa.m b/src/main-cocoa.m index 30574194d..fad26ecdb 100644 --- a/src/main-cocoa.m +++ b/src/main-cocoa.m @@ -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++; -- 2.11.0