diff options
| author | jabiertxof <jabiertxof@debian.marker.es> | 2015-04-29 14:33:09 +0000 |
|---|---|---|
| committer | jabiertxof <jabiertxof@debian.marker.es> | 2015-04-29 14:33:09 +0000 |
| commit | cd2a40d327c536e12dd113a0c8c2fe5038affe48 (patch) | |
| tree | 7e8c12e63848a90246f591067244f6891fd70336 /src/extension/internal/wmf-print.cpp | |
| parent | Fis fix a bug finded in my presentation in the HackFest (diff) | |
| parent | Increase precision (long thin paths had a ton of width variance), fix logic e... (diff) | |
| download | inkscape-cd2a40d327c536e12dd113a0c8c2fe5038affe48.tar.gz inkscape-cd2a40d327c536e12dd113a0c8c2fe5038affe48.zip | |
update to trunk
(bzr r12588.1.44)
Diffstat (limited to 'src/extension/internal/wmf-print.cpp')
| -rw-r--r-- | src/extension/internal/wmf-print.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp index 567f9f366..9fe1a0259 100644 --- a/src/extension/internal/wmf-print.cpp +++ b/src/extension/internal/wmf-print.cpp @@ -61,6 +61,7 @@ #include "splivarot.h" // pieces for union on shapes #include "2geom/svg-path-parser.h" // to get from SVG text to Geom::Path #include "display/canvas-bpath.h" // for SPWindRule +#include "display/cairo-utils.h" // for Inkscape::Pixbuf::PF_CAIRO #include "wmf-print.h" @@ -471,9 +472,8 @@ int PrintWmf::create_brush(SPStyle const *style, U_COLORREF *fcolor) rgba_px = (char *) pixbuf->pixels(); // Do NOT free this!!! colortype = U_BCBM_COLOR32; (void) RGBA_to_DIB(&px, &cbPx, &ct, &numCt, rgba_px, width, height, width * 4, colortype, 0, 1); - // Not sure why the next swap is needed because the preceding does it, and the code is identical - // to that in stretchdibits_set, which does not need this. - swapRBinRGBA(px, width * height); + // pixbuf can be either PF_CAIRO or PF_GDK, and these have R and B bytes swapped + if (pixbuf->pixelFormat() == Inkscape::Pixbuf::PF_CAIRO) { swapRBinRGBA(px, width * height); } Bmih = bitmapinfoheader_set(width, height, 1, colortype, U_BI_RGB, 0, PXPERMETER, PXPERMETER, numCt, 0); Bmi = bitmapinfo_set(Bmih, ct); rec = wcreatedibpatternbrush_srcdib_set(&brush, wht, U_DIB_RGB_COLORS, Bmi, cbPx, px); |
