summaryrefslogtreecommitdiff
path: root/vcl/backendtest
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-03-30 20:34:04 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-04-01 11:25:59 +0200
commit3ee0628e269f16f0fee5dde51e90bbf5180413a2 (patch)
tree215fd49e8477cfe18afdf16d7bbc0e3c972b4fc9 /vcl/backendtest
parent61aa663d9b1d75d1bb0cfc7c4c9e4cb17d8dd00a (diff)
SalInvert::N50 has 1x1 pixel checker size, not 2x2 (tdf#131580)
This can be seen with widget styles that use invert() to draw focus rectangle, such as with VCL gen or win backends. Change-Id: I7fb36d1be5333e917f871f8504585e32abe82b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91380 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/backendtest')
-rw-r--r--vcl/backendtest/outputdevice/common.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx
index e76150c49c1f..f9052fb77201 100644
--- a/vcl/backendtest/outputdevice/common.cxx
+++ b/vcl/backendtest/outputdevice/common.cxx
@@ -302,11 +302,11 @@ TestResult OutputDeviceTestCommon::checkChecker(Bitmap& rBitmap, sal_Int32 nStar
TestResult aReturnValue = TestResult::Passed;
int choice = 0;
- for (sal_Int32 y = nStartY; y <= nEndY; y+=2)
+ for (sal_Int32 y = nStartY; y <= nEndY; ++y)
{
- for (sal_Int32 x = nStartX; x <= nEndX; x+=2)
+ for (sal_Int32 x = nStartX; x <= nEndX; ++x)
{
- TestResult eResult = checkFilled(rBitmap, tools::Rectangle(Point(x, y), Size(2, 2)), rExpected[choice % 2]);
+ TestResult eResult = checkFilled(rBitmap, tools::Rectangle(Point(x, y), Size(1, 1)), rExpected[choice % 2]);
checkResult(eResult, aReturnValue);
choice++;
}
@@ -324,13 +324,13 @@ TestResult OutputDeviceTestCommon::checkInvertN50Rectangle(Bitmap& aBitmap)
eResult = checkRectangles(aBitmap, aExpected);
checkResult(eResult, aReturnValue);
- eResult = checkChecker(aBitmap, 2, 8, 2, 8, { COL_LIGHTCYAN, COL_LIGHTRED });
+ eResult = checkChecker(aBitmap, 2, 9, 2, 9, { COL_LIGHTCYAN, COL_LIGHTRED });
checkResult(eResult, aReturnValue);
- eResult = checkChecker(aBitmap, 2, 8, 10, 16, { COL_YELLOW, COL_LIGHTBLUE });
+ eResult = checkChecker(aBitmap, 2, 9, 10, 17, { COL_YELLOW, COL_LIGHTBLUE });
checkResult(eResult, aReturnValue);
- eResult = checkChecker(aBitmap, 10, 16, 2, 8, { COL_LIGHTMAGENTA, COL_LIGHTGREEN });
+ eResult = checkChecker(aBitmap, 10, 17, 2, 9, { COL_LIGHTMAGENTA, COL_LIGHTGREEN });
checkResult(eResult, aReturnValue);
- eResult = checkChecker(aBitmap, 10, 16, 10, 16, { COL_BLACK, COL_WHITE });
+ eResult = checkChecker(aBitmap, 10, 17, 10, 17, { COL_BLACK, COL_WHITE });
checkResult(eResult, aReturnValue);
return aReturnValue;