diff options
author | Muthu Subramanian <sumuthu@suse.com> | 2013-04-26 14:02:47 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@suse.com> | 2013-04-26 14:04:21 +0530 |
commit | 5a1d77327867ae9b80bc676d67f1f70a5d8a2fd4 (patch) | |
tree | eb331ccfa7f8f25706db7f132924d67703c2d6b2 /cppcanvas | |
parent | 170668d83911c12475eccf69eba5e191863d4a56 (diff) |
fdo#60638: Workaround should be in FillRects rather than FillPolygon.
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index bcc24f2a94c7..2a3d9deb59c0 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -890,10 +890,6 @@ namespace cppcanvas EMFP_DEBUG (printf ("EMF+\t\tcolor fill:0x%X\n", brushIndexOrColor)); rState.isFillColorSet = true; rState.isLineColorSet = false; - // n#812793: EMF+ Seems to specify transparent background with Alpha=0xFF ! - // Workaround for the problem. - if(brushIndexOrColor == 0xFFFFFFFF) - brushIndexOrColor = 0xFFFFFF; SET_FILL_COLOR(brushIndexOrColor); @@ -1415,6 +1411,7 @@ namespace cppcanvas sal_uInt32 brushIndexOrColor; sal_Int32 rectangles; + bool isColor = (flags & 0x8000); ::basegfx::B2DPolygon polygon; rMF >> brushIndexOrColor >> rectangles; @@ -1450,7 +1447,12 @@ namespace cppcanvas ::basegfx::B2DPolyPolygon polyPolygon (polygon); - EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor); + // n#812793: EMF+ Seems to specify transparent background with Alpha=0xFF ! + // Workaround for the problem. + if( isColor && brushIndexOrColor == 0xFFFFFFFF && rectangles == 1 ) + brushIndexOrColor = 0xFFFFFF; + + EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, isColor, brushIndexOrColor); } break; } |