diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2003-04-08 14:42:05 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2003-04-08 14:42:05 +0000 |
commit | 8c28250c2e0dec3b7af9e69ee2f600fd0f96a468 (patch) | |
tree | 3c27f29e4b8dcdc720205cb973bd50f4f43f54f3 /svtools | |
parent | 0f445a77c854451a2b66e5e7ef05162ed7341ec8 (diff) |
INTEGRATION: CWS draw8 (1.29.2.1.62); FILE MERGED
2003/03/29 13:06:31 af 1.29.2.1.62.2: RESYNC: (1.29.2.1-1.29.2.2); FILE MERGED
2003/03/14 15:59:04 sj 1.29.2.1.62.1: #108216# not trying to clip regions that are too complex (because of performance problems)
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/filter.vcl/wmf/winmtf.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx index f7c6453473d0..bf62bed5b66d 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.cxx +++ b/svtools/source/filter.vcl/wmf/winmtf.cxx @@ -2,9 +2,9 @@ * * $RCSfile: winmtf.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: hr $ $Date: 2003-03-27 14:38:39 $ + * last change: $Author: rt $ $Date: 2003-04-08 15:42:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,6 +67,8 @@ #endif // ------------------------------------------------------------------------ +#define WIN_MTF_MAX_POLYPOLYCOUNT 16 + void WinMtfClipPath::ImpUpdateType() { if ( !aPolyPoly.Count() ) @@ -83,7 +85,7 @@ void WinMtfClipPath::IntersectClipRect( const Rectangle& rRect ) { if ( !aPolyPoly.Count() ) aPolyPoly = Polygon( rRect ); - else + else if ( aPolyPoly.Count() < WIN_MTF_MAX_POLYPOLYCOUNT ) { Polygon aPolygon( rRect ); PolyPolygon aIntersection; @@ -96,7 +98,7 @@ void WinMtfClipPath::IntersectClipRect( const Rectangle& rRect ) void WinMtfClipPath::ExcludeClipRect( const Rectangle& rRect ) { - if ( aPolyPoly.Count() ) + if ( aPolyPoly.Count() && ( aPolyPoly.Count() < WIN_MTF_MAX_POLYPOLYCOUNT ) ) { Polygon aPolygon( rRect ); PolyPolygon aPolyPolyRect( aPolygon ); @@ -109,10 +111,11 @@ void WinMtfClipPath::ExcludeClipRect( const Rectangle& rRect ) void WinMtfClipPath::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ) { - if ( rPolyPolygon.Count() ) + if ( !rPolyPolygon.Count() ) + aPolyPoly = rPolyPolygon; + else if ( rPolyPolygon.Count() < WIN_MTF_MAX_POLYPOLYCOUNT ) { PolyPolygon aNewClipPath; - switch ( nClippingMode ) { case RGN_OR : @@ -133,8 +136,6 @@ void WinMtfClipPath::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nCl } aPolyPoly = aNewClipPath; } - else - aPolyPoly = rPolyPolygon; ImpUpdateType(); } |