[Scummvm-git-logs] scummvm master -> 9a6d04fa01ce346a5aba2fd72a3b82a48137d2c1

sev- noreply at scummvm.org
Sun Nov 21 19:24:03 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9a6d04fa01 Revert "GRAPHICS: fix off-by-one errors when drawing a rounded rectangle"


Commit: 9a6d04fa01ce346a5aba2fd72a3b82a48137d2c1
    https://github.com/scummvm/scummvm/commit/9a6d04fa01ce346a5aba2fd72a3b82a48137d2c1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-11-21T20:23:37+01:00

Commit Message:
Revert "GRAPHICS: fix off-by-one errors when drawing a rounded rectangle"

This reverts commit 2d8e0579eab1f4d69ccc36bf0f2071002539d5e8.

This leads to artifacts in GUI

Changed paths:
    graphics/VectorRendererSpec.cpp


diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index bd9f39fc6a..df06b50c59 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -4140,9 +4140,9 @@ drawInteriorRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType colo
 	rsq = r*r;
 
 	PixelType *ptr_tl = (PixelType *)Base::_activeSurface->getBasePtr(x1 + r, y1 + r);
-	PixelType *ptr_tr = (PixelType *)Base::_activeSurface->getBasePtr(x1 + w - 1 - r, y1 + r);
-	PixelType *ptr_bl = (PixelType *)Base::_activeSurface->getBasePtr(x1 + r, y1 + h - 1 - r);
-	PixelType *ptr_br = (PixelType *)Base::_activeSurface->getBasePtr(x1 + w - 1 - r, y1 + h - 1 - r);
+	PixelType *ptr_tr = (PixelType *)Base::_activeSurface->getBasePtr(x1 + w - r, y1 + r);
+	PixelType *ptr_bl = (PixelType *)Base::_activeSurface->getBasePtr(x1 + r, y1 + h - r);
+	PixelType *ptr_br = (PixelType *)Base::_activeSurface->getBasePtr(x1 + w - r, y1 + h - r);
 	PixelType *ptr_fill = (PixelType *)Base::_activeSurface->getBasePtr(x1, y1);
 
 	int short_h = h - 2 * r;
@@ -4214,7 +4214,7 @@ drawInteriorRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType colo
 
 		ptr_fill += pitch * r;
 		while (short_h-- >= 0) {
-			colorFill<PixelType>(ptr_fill, ptr_fill + w, color);
+			colorFill<PixelType>(ptr_fill, ptr_fill + w + 1, color);
 			ptr_fill += pitch;
 		}
 	}




More information about the Scummvm-git-logs mailing list