diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-03 12:31:03 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-03 12:31:03 +0000 |
commit | d6e646b1b0e097dbee9cdf979560632dfc3c9066 (patch) | |
tree | 95461fc0314c10713f56b6f782ccda5e68e1573e /basegfx | |
parent | 4a086f0c27ea5fb5e0dbbb75711bfd992a8f9904 (diff) |
INTEGRATION: CWS aw017 (1.3.34); FILE MERGED
2004/07/29 14:04:30 aw 1.3.34.1: #i25616#
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/inc/basegfx/polygon/b3dpolygontools.hxx | 8 | ||||
-rw-r--r-- | basegfx/inc/basegfx/polygon/b3dpolypolygontools.hxx | 8 | ||||
-rw-r--r-- | basegfx/source/polygon/b3dpolygontools.cxx | 12 |
3 files changed, 20 insertions, 8 deletions
diff --git a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx index 72e10e9012bd..fe225f530a35 100644 --- a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx @@ -2,9 +2,9 @@ * * $RCSfile: b3dpolygontools.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: thb $ $Date: 2004-02-16 17:03:06 $ + * last change: $Author: hr $ $Date: 2004-08-03 13:30:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,7 +128,9 @@ namespace basegfx // Apply Line Dashing. This cuts the Polygon into line pieces // which are inserted as single polygons into the result. - ::basegfx::B3DPolyPolygon applyLineDashing(const ::basegfx::B3DPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen); + // If fFullDashDotLen is not given it will be calculated from the given + // raDashDotArray. + ::basegfx::B3DPolyPolygon applyLineDashing(const ::basegfx::B3DPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen = 0.0); } // end of namespace tools } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/polygon/b3dpolypolygontools.hxx b/basegfx/inc/basegfx/polygon/b3dpolypolygontools.hxx index f708871fbb23..b39dc2956958 100644 --- a/basegfx/inc/basegfx/polygon/b3dpolypolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b3dpolypolygontools.hxx @@ -2,9 +2,9 @@ * * $RCSfile: b3dpolypolygontools.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: thb $ $Date: 2004-02-16 17:03:07 $ + * last change: $Author: hr $ $Date: 2004-08-03 13:30:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,7 +89,9 @@ namespace basegfx // Apply Line Dashing. This cuts every contained PolyPolygon into line pieces // which are inserted as single polygons into the result. - ::basegfx::B3DPolyPolygon applyLineDashing(const ::basegfx::B3DPolyPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen); + // If fFullDashDotLen is not given it will be calculated from the given + // raDashDotArray. + ::basegfx::B3DPolyPolygon applyLineDashing(const ::basegfx::B3DPolyPolygon& rCandidate, const ::std::vector<double>& raDashDotArray, double fFullDashDotLen = 0.0); } // end of namespace tools } // end of namespace basegfx diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx index e4f2011795ae..965f1e7363d0 100644 --- a/basegfx/source/polygon/b3dpolygontools.cxx +++ b/basegfx/source/polygon/b3dpolygontools.cxx @@ -2,9 +2,9 @@ * * $RCSfile: b3dpolygontools.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: thb $ $Date: 2004-01-16 10:34:34 $ + * last change: $Author: hr $ $Date: 2004-08-03 13:31:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,6 +79,8 @@ #include <basegfx/range/b3drange.hxx> #endif +#include <numeric> + ////////////////////////////////////////////////////////////////////////////// namespace basegfx @@ -352,6 +354,12 @@ namespace basegfx { ::basegfx::B3DPolyPolygon aRetval; + if(0.0 == fFullDashDotLen && raDashDotArray.size()) + { + // calculate fFullDashDotLen from raDashDotArray + fFullDashDotLen = ::std::accumulate(raDashDotArray.begin(), raDashDotArray.end(), 0.0); + } + if(rCandidate.count() && fFullDashDotLen > 0.0) { const sal_uInt32 nCount(rCandidate.isClosed() ? rCandidate.count() : rCandidate.count() - 1L); |