summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2013-04-25 11:57:59 +0530
committerMuthu Subramanian <sumuthu@suse.com>2013-04-25 12:00:51 +0530
commitabd0ed222788077b66d92b84f0918309aa58d865 (patch)
tree5097ee78e7bdf85ccbcca09067e30fb5ad1d3427 /cppcanvas
parentcab42b24aecf2207f6c47f262b5ac5f81a6abb39 (diff)
n#812793: (Workaround) Transparent background import in EMF+.
EMF+ seems to have alpha of 0xff for transparent background!
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 81f7eb7de01b..1ef38a62ad0a 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -890,10 +890,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 ) );