diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2021-10-02 11:11:32 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-10-13 19:40:47 +0200 |
commit | be052cbc459266db86c7ddd8daba1d30b7e66d57 (patch) | |
tree | d0ed0a687188823889321f2adc75eb7975fa3da5 /vcl | |
parent | c26c9115245a7ed9a6117924d22fcd5634217b99 (diff) |
vcl: DrawPolyLine() did not set metaaction line join or cap
basegfx::B2DPolygon version of DrawPolyLine() doesn't set the metafile
line cap or join, this fixes this issue.
Change-Id: Id5d73537b0fc5e580789a98b7c5214d586da3cc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122974
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/outdev.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/polyline.cxx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index b15bbe1785cb..6429e7c01220 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -1896,12 +1896,10 @@ void VclOutdevTest::testDrawPolyLine() pPolyLineAction->GetLineInfo().GetDotLen()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Distance wrong", static_cast<double>(0), pPolyLineAction->GetLineInfo().GetDistance()); - /* these aren't set! CPPUNIT_ASSERT_EQUAL_MESSAGE("Line join", basegfx::B2DLineJoin::Bevel, pPolyLineAction->GetLineInfo().GetLineJoin()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Line cap", css::drawing::LineCap_BUTT, pPolyLineAction->GetLineInfo().GetLineCap()); - */ } } diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index aeeb90845bd1..ef4f0a4a5f2d 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -149,6 +149,9 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon, if( fLineWidth != 0.0 ) aLineInfo.SetWidth( fLineWidth ); + aLineInfo.SetLineJoin(eLineJoin); + aLineInfo.SetLineCap(eLineCap); + const tools::Polygon aToolsPolygon( rB2DPolygon ); mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) ); } |