summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev/_xpoly.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-11-26 13:29:59 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-11-26 13:29:59 +0000
commit7eeee2c45a2c17a6f5553b269892ae375f8139d4 (patch)
tree64a08a63f3939d3189f72c9ebd94ff117616e47f /svx/source/xoutdev/_xpoly.cxx
parent5606137970711ebc1ec3b72d1fc1948106f68615 (diff)
INTEGRATION: CWS sj12 (1.8.36); FILE MERGED
2004/11/23 16:00:12 sj 1.8.36.1: #i37709#
Diffstat (limited to 'svx/source/xoutdev/_xpoly.cxx')
-rw-r--r--svx/source/xoutdev/_xpoly.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index c4b4b89c8ffd..b6da49edfd9b 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: _xpoly.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: pjunck $ $Date: 2004-11-03 11:08:45 $
+ * last change: $Author: rt $ $Date: 2004-11-26 14:29:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -754,16 +754,22 @@ Rectangle XPolygon::GetBoundRect() const
if(pImpXPolygon->nPoints)
{
- const ::basegfx::B2DPolygon aPolygon(getB2DPolygon());
+ ::basegfx::B2DPolygon aPolygon(getB2DPolygon());
+
+ if(aPolygon.areControlPointsUsed())
+ {
+ // #i37709#
+ // For historical reasons the control points are not part of the
+ // BoundRect. This makes it necessary to subdivide the polygon to
+ // get a relatively correct BoundRect. Numerically, this is not
+ // correct and never was.
+ aPolygon = ::basegfx::tools::adaptiveSubdivideByAngle(aPolygon);
+ }
+
const ::basegfx::B2DRange aPolygonRange(::basegfx::tools::getRange(aPolygon));
aRetval = Rectangle(
FRound(aPolygonRange.getMinX()), FRound(aPolygonRange.getMinY()),
FRound(aPolygonRange.getMaxX()), FRound(aPolygonRange.getMaxY()));
-
-//BFS09 if(pOut)
-//BFS09 {
-//BFS09 aRetval = pOut->PixelToLogic(aRetval);
-//BFS09 }
}
return aRetval;