From 4bc3ead0649bf2885050ec4cfb47a5ed13bfa41e Mon Sep 17 00:00:00 2001 From: Muthu Subramanian Date: Thu, 25 Apr 2013 11:57:59 +0530 Subject: n#812793: (Workaround) Transparent background import in EMF+. EMF+ seems to have alpha of 0xff for transparent background! --- cppcanvas/source/mtfrenderer/emfplus.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cppcanvas') diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 17ec217130c0..bcc24f2a94c7 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -887,10 +887,14 @@ namespace cppcanvas ActionSharedPtr pPolyAction; if (isColor) { - EMFP_DEBUG (printf ("EMF+\t\tcolor fill\n")); - + 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); pPolyAction = ActionSharedPtr ( internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState ) ); -- cgit