diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-26 11:00:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-12 15:38:50 +0100 |
commit | 70e3eb2c1762fb1ca097cf671e3c7ce3d0dfd1b7 (patch) | |
tree | 80ec388e04d6fa22e19c8ba5329cab9f2068c666 /basegfx/source/polygon/b2dpolypolygontools.cxx | |
parent | a70233e991619e134fde2c5ff6037960d07a06ae (diff) |
Resolves: #i121267# added support for taking clipping into account...
for metafile-based exporters to vector formats
(cherry picked from commit 229a79b97110c11ef21b7b99ffc768254ca01d96)
Conflicts:
basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
filter/source/flash/swfexporter.cxx
filter/source/graphicfilter/eos2met/eos2met.cxx
svtools/source/filter/wmf/wmf.cxx
vcl/Package_inc.mk
Remove unused variable to prevent compile warnings.
(cherry picked from commit 60d19c1602e4fec740624fd20a7bfd39707297e4)
Change-Id: Iaeb02d7321bea2890cf4e969f1d45d58deef5584
106285f06a21f4f39f34c6755d12ac6cd4196a7f
Diffstat (limited to 'basegfx/source/polygon/b2dpolypolygontools.cxx')
-rw-r--r-- | basegfx/source/polygon/b2dpolypolygontools.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx index 8a5337bfe4b1..c2b18eff4e44 100644 --- a/basegfx/source/polygon/b2dpolypolygontools.cxx +++ b/basegfx/source/polygon/b2dpolypolygontools.cxx @@ -243,6 +243,26 @@ namespace basegfx return aRetval; } + double getSignedArea(const B2DPolyPolygon& rCandidate) + { + double fRetval(0.0); + const sal_uInt32 nPolygonCount(rCandidate.count()); + + for(sal_uInt32 a(0L); a < nPolygonCount; a++) + { + const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a)); + + fRetval += tools::getSignedArea(aCandidate); + } + + return fRetval; + } + + double getArea(const B2DPolyPolygon& rCandidate) + { + return fabs(getSignedArea(rCandidate)); + } + void applyLineDashing(const B2DPolyPolygon& rCandidate, const ::std::vector<double>& rDotDashArray, B2DPolyPolygon* pLineTarget, B2DPolyPolygon* pGapTarget, double fFullDashDotLen) { if(0.0 == fFullDashDotLen && rDotDashArray.size()) |