summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-09-25 18:02:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-26 08:45:44 +0200
commit2c5d5a6d55a1ebd153f05523972a2c625484bde2 (patch)
tree20542ccc410b1797ac8405cffbba4f9b165a3e4b /vcl/source/outdev
parenta5c830a81077319d753d8cadd857448f0a1952a9 (diff)
tools::PolyPolygon -> basegfx in filter
which needed an extra method on OutputDevice. Also add some utility methods to make future conversion work easier. Change-Id: I57c5bc7505e656a014f2e723fea2aa79271e6515 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/polyline.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index 2a405e5eaf5a..b69a4e324417 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -135,6 +135,36 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rL
drawPolyLine(rPoly, rLineInfo);
}
+void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rPoly, const LineInfo& rLineInfo )
+{
+ assert(!is_double_buffered_window());
+
+ if ( rLineInfo.IsDefault() )
+ {
+ DrawPolyLine( rPoly );
+ return;
+ }
+
+ // #i101491#
+ // Try direct Fallback to B2D-Version of DrawPolyLine
+ if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
+ LineStyle::Solid == rLineInfo.GetStyle())
+ {
+ DrawPolyLine(
+ rPoly,
+ static_cast< double >(rLineInfo.GetWidth()),
+ rLineInfo.GetLineJoin(),
+ rLineInfo.GetLineCap(),
+ basegfx::deg2rad(15.0) /* default fMiterMinimumAngle, value not available in LineInfo */);
+ return;
+ }
+
+ if ( mpMetaFile )
+ mpMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon(rPoly), rLineInfo ) );
+
+ drawPolyLine(tools::Polygon(rPoly), rLineInfo);
+}
+
void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
double fLineWidth,
basegfx::B2DLineJoin eLineJoin,