diff options
| author | David Mathog <mathog@caltech.edu> | 2013-10-24 21:32:31 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2013-10-24 21:32:31 +0000 |
| commit | 28c2b3040acb1984f352e1672ed65fa78fe44dde (patch) | |
| tree | 1140d1f184ef98bb978afc8f5489b8c8f3bf37f6 /src | |
| parent | try to add some const-correctness (diff) | |
| download | inkscape-28c2b3040acb1984f352e1672ed65fa78fe44dde.tar.gz inkscape-28c2b3040acb1984f352e1672ed65fa78fe44dde.zip | |
Fix for Bug 1243937 (EMF import, diagram obscured by full page rectangle)
Fixed bugs:
- https://launchpad.net/bugs/1243937
(bzr r12720)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/emf-inout.cpp | 1 | ||||
| -rw-r--r-- | src/extension/internal/wmf-inout.cpp | 3 | ||||
| -rw-r--r-- | src/libuemf/uemf.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp index ab03f832f..f4b26d4f0 100644 --- a/src/extension/internal/emf-inout.cpp +++ b/src/extension/internal/emf-inout.cpp @@ -2859,6 +2859,7 @@ std::cout << "BEFORE DRAW" if (!pEmr->cbBmiSrc) { // should be an application of a DIBPATTERNBRUSHPT, use a solid color instead + if(pEmr->dwRop == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */ int32_t dx = pEmr->Dest.x; int32_t dy = pEmr->Dest.y; int32_t dw = pEmr->cDest.x; diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index 208077cd1..f98890809 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -2284,6 +2284,7 @@ std::cout << "BEFORE DRAW" dbg_str << "<!-- U_WMR_BITBLT -->\n"; nSize = U_WMRBITBLT_get(contents,&Dst,&cwh,&Src,&dwRop3,&Bm16,&px); if(!px){ + if(dwRop3 == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */ int32_t dx = Dst.x; int32_t dy = Dst.y; int32_t dw = cwh.x; @@ -2321,6 +2322,7 @@ std::cout << "BEFORE DRAW" dbg_str << "<!-- U_WMR_STRETCHBLT -->\n"; nSize = U_WMRSTRETCHBLT_get(contents,&Dst,&cDst,&Src,&cSrc,&dwRop3,&Bm16,&px); if(!px){ + if(dwRop3 == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */ int32_t dx = Dst.x; int32_t dy = Dst.y; int32_t dw = cDst.x; @@ -2715,6 +2717,7 @@ std::cout << "BEFORE DRAW" if (!dib) { // should be an application of a DIBPATTERNBRUSHPT, use a solid color instead + if(dwRop3 == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */ int32_t dx = Dst.x; int32_t dy = Dst.y; int32_t dw = cwh.x; diff --git a/src/libuemf/uemf.h b/src/libuemf/uemf.h index f1211d63d..1ff6ead60 100644 --- a/src/libuemf/uemf.h +++ b/src/libuemf/uemf.h @@ -856,6 +856,7 @@ extern "C" { #define U_DSTINVERT 0x550009 #define U_BLACKNESS 0x000042 #define U_WHITENESS 0xff0062 +#define U_NOOP 0xaa0029 /* Many GDI programs end with a bitblt with this ROP == "D". Seems to work like flush() */ /** @} */ /** \defgroup U_EMRSETROP2_iMode_Qualifiers Binary Raster Operation Enumeration |
