diff options
Diffstat (limited to 'tools/source/generic/poly.cxx')
-rw-r--r-- | tools/source/generic/poly.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 7f1eb94b646d..509d2ab4969d 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1615,7 +1615,16 @@ void Polygon::Clip( const Rectangle& rRect, BOOL bPolygon ) Rectangle Polygon::GetBoundRect() const { DBG_CHKTHIS( Polygon, NULL ); - DBG_ASSERT( !mpImplPolygon->mpFlagAry, "GetBoundRect could fail with beziers!" ); + // Removing the assert. Bezier curves have the attribute that each single + // curve segment defined by four points can not exit the four-point polygon + // defined by that points. This allows to say that the curve segment can also + // never leave the Range of it's defining points. + // The result is that Polygon::GetBoundRect() may not create the minimal + // BoundRect of the Polygon (to get that, use basegfx::B2DPolygon classes), + // but will always create a valid BoundRect, at least as long as this method + // 'blindly' travels over all points, including control points. + // + // DBG_ASSERT( !mpImplPolygon->mpFlagAry, "GetBoundRect could fail with beziers!" ); USHORT nCount = mpImplPolygon->mnPoints; if( ! nCount ) |