fix tdf#124848 test on Mac
AquaSalGraphics: :drawPolyLine() does not implement
basegfx: :B2DLineJoin::NONE for large line width.
Change-Id: I406941797ad2b8bab79ea0a635eddc624755cbdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93568
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index f06d8fc..7fa586b 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -468,16 +468,18 @@ public:
// in case of a larger rotation.
matrix.rotate(M_PI); //180 degrees
matrix.translate(100, 100);
CPPUNIT_ASSERT(device->DrawPolyLineDirect(
matrix, basegfx::B2DPolygon{ { 50, 50 }, { 50, 100 } }, 100));
CPPUNIT_ASSERT(device->DrawPolyLineDirect(matrix,
basegfx::B2DPolygon{ { 50, 50 }, { 50, 100 } },
100, 0, nullptr, basegfx::B2DLineJoin::Miter));
exportDevice("/tmp/tdf124848-1.png", device);
// 100px wide line should fill the entire width of the upper half
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(2, 2)));
// Also check hairline.
device->Erase();
CPPUNIT_ASSERT(
device->DrawPolyLineDirect(matrix, basegfx::B2DPolygon{ { 50, 50 }, { 50, 100 } }, 0));
CPPUNIT_ASSERT(device->DrawPolyLineDirect(matrix,
basegfx::B2DPolygon{ { 50, 50 }, { 50, 100 } }, 0,
0, nullptr, basegfx::B2DLineJoin::Miter));
exportDevice("/tmp/tdf124848-2.png", device);
// 1px wide
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(50, 20)));