diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-09 10:47:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-09 15:03:30 +0200 |
commit | a20f9320959c112ed7d927c05ac7d5ba9604c86d (patch) | |
tree | 2f78c5526be0e6da653170b98272600c3300c262 /cppcanvas | |
parent | 118d27504022b6f69f24844e21a551e9e9efc399 (diff) |
fdo#77229 EMF+ rendering: improve EmfPlusSetClipPath's CombineModeExclude case
This is still not perfect, but at least we now don't do the opposite of
what was asked.
Change-Id: I5e144c5ec2987902e65b2eb472259d9c39bbbd11
(cherry picked from commit c2af50eb6df396c957890a6b912b8f3185893551)
Conflicts:
cppcanvas/source/mtfrenderer/emfplus.cxx
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 4f08c173b603..d9659a8807e7 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -124,6 +124,16 @@ const sal_uInt32 EmfPlusLineJoinTypeMiterClipped = 0x00000003; #define EMFP_DEBUG(x) #endif +enum EmfPlusCombineMode +{ + EmfPlusCombineModeReplace = 0x00000000, + EmfPlusCombineModeIntersect = 0x00000001, + EmfPlusCombineModeUnion = 0x00000002, + EmfPlusCombineModeXOR = 0x00000003, + EmfPlusCombineModeExclude = 0x00000004, + EmfPlusCombineModeComplement = 0x00000005 +}; + using namespace ::com::sun::star; using namespace ::basegfx; @@ -2137,7 +2147,19 @@ namespace cppcanvas ::basegfx::B2DPolyPolygon& clipPoly (path.GetPolygon (*this)); clipPoly.transform (rState.mapModeTransform); - updateClipping (clipPoly, rFactoryParms, combineMode == 1); + switch (combineMode) + { + case EmfPlusCombineModeReplace: + case EmfPlusCombineModeIntersect: + case EmfPlusCombineModeUnion: // Is this, EmfPlusCombineModeXOR and EmfPlusCombineModeComplement correct? + case EmfPlusCombineModeXOR: + case EmfPlusCombineModeComplement: + updateClipping (clipPoly, rFactoryParms, combineMode == 1); + break; + case EmfPlusCombineModeExclude: + // Not doing anything is better then including exactly what we wanted to exclude. + break; + } break; } |