summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Mathog <mathog@caltech.edu>2013-10-24 21:35:44 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-10-24 21:35:44 +0000
commitdb4a12935328ae0ac1ce6230aa0b5f5e5ed43ee5 (patch)
treefc463fcedf02ff17197dd07258d8c0105d6ea61b /src
parentFix for Bug 1243937 (EMF import, diagram obscured by full page rectangle) (diff)
downloadinkscape-db4a12935328ae0ac1ce6230aa0b5f5e5ed43ee5.tar.gz
inkscape-db4a12935328ae0ac1ce6230aa0b5f5e5ed43ee5.zip
Fix for Bug 1242927 (minor EMF import issues)
Fixed bugs: - https://launchpad.net/bugs/1242927 (bzr r12721)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/emf-inout.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp
index f4b26d4f0..36d7ca145 100644
--- a/src/extension/internal/emf-inout.cpp
+++ b/src/extension/internal/emf-inout.cpp
@@ -789,8 +789,12 @@ Emf::output_style(PEMF_CALLBACK_DATA d, int iType)
// Assume src color is "white"
if(d->dwRop3){
switch(d->dwRop3){
- case U_PATINVERT: // treat all of these as black
- case U_SRCINVERT:
+ case U_PATINVERT: // invert pattern
+ fill_rgb[0] = 1.0 - fill_rgb[0];
+ fill_rgb[1] = 1.0 - fill_rgb[1];
+ fill_rgb[2] = 1.0 - fill_rgb[2];
+ break;
+ case U_SRCINVERT: // treat all of these as black
case U_DSTINVERT:
case U_BLACKNESS:
case U_SRCERASE:
@@ -799,7 +803,6 @@ Emf::output_style(PEMF_CALLBACK_DATA d, int iType)
break;
case U_SRCCOPY: // treat all of these as white
case U_NOTSRCERASE:
- case U_PATCOPY:
case U_WHITENESS:
fill_rgb[0]=fill_rgb[1]=fill_rgb[2]=1.0;
break;
@@ -808,6 +811,7 @@ Emf::output_style(PEMF_CALLBACK_DATA d, int iType)
case U_MERGECOPY:
case U_MERGEPAINT:
case U_PATPAINT:
+ case U_PATCOPY:
default:
break;
}
@@ -2747,7 +2751,10 @@ std::cout << "BEFORE DRAW"
{
dbg_str << "<!-- U_EMR_BEGINPATH -->\n";
// The next line should never be needed, should have been handled before main switch
- *(d->path) = "";
+ // qualifier added because EMF's encountered where moveto preceded beginpath followed by lineto
+ if(d->mask & U_DRAW_VISIBLE){
+ *(d->path) = "";
+ }
d->mask |= emr_mask;
break;
}