testpat: fix the location of second diagonal line
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 5 Jun 2017 07:19:38 +0000 (10:19 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 5 Jun 2017 07:19:38 +0000 (10:19 +0300)
kms++util/src/testpat.cpp

index dbd8fe69e583c37d310869933bf8bb9ceb1d6d3d..faacda3a437f8c377b16a8c427e5ad2a864678c3 100644 (file)
@@ -55,7 +55,7 @@ static RGB get_test_pattern_pixel(IMappedFramebuffer& fb, unsigned x, unsigned y
                if (x == y || w - x == h - y)
                        return RGB(255, 255, 255);
                // diagonal line
-               else if (w - x == y || x == h - y)
+               else if (w - x - 1 == y || x == h - y - 1)
                        return RGB(255, 255, 255);
                else {
                        int t = (x - xm1 - 1) * 8 / (xm2 - xm1 - 1);