From: Fridrich S. <str...@us...> - 2008-07-09 14:46:26
|
Update of /cvsroot/libwpg/libwpg/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4244/src/lib Modified Files: WPG2Parser.cpp WPGBitmap.cpp Log Message: don't assume 1200 dpi if the document specifies different one Index: WPG2Parser.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPG2Parser.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- WPG2Parser.cpp 9 Jul 2008 13:45:30 -0000 1.66 +++ WPG2Parser.cpp 9 Jul 2008 14:46:22 -0000 1.67 @@ -38,7 +38,7 @@ #define M_PI 3.14159265358979323846 #endif -#define DUMP_BINARY_DATA 1 +#define DUMP_BINARY_DATA 0 static const unsigned char defaultWPG2PaletteRed[] = { 0x00, 0xFF, 0x7F, 0xBF, 0x00, 0x00, 0x00, 0x7F, @@ -1776,10 +1776,10 @@ long ys1 = (y1 <= y2) ? y1 : y2; long ys2 = (y1 <= y2) ? y2 : y1; - m_binaryData.x1 = TO_DOUBLE(xs1) / 1200; - m_binaryData.y1 = TO_DOUBLE(ys1) / 1200; - m_binaryData.x2 = TO_DOUBLE(xs2) / 1200; - m_binaryData.y2 = TO_DOUBLE(ys2) / 1200; + m_binaryData.x1 = TO_DOUBLE(xs1) / m_xres; + m_binaryData.y1 = TO_DOUBLE(ys1) / m_yres; + m_binaryData.x2 = TO_DOUBLE(xs2) / m_xres; + m_binaryData.y2 = TO_DOUBLE(ys2) / m_yres; unsigned long numDescriptions = readU16(); Index: WPGBitmap.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGBitmap.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- WPGBitmap.cpp 9 Jul 2008 13:45:30 -0000 1.17 +++ WPGBitmap.cpp 9 Jul 2008 14:46:23 -0000 1.18 @@ -29,7 +29,7 @@ #include <sstream> -#define DUMP_BITMAP 1 +#define DUMP_BITMAP 0 #if DUMP_BITMAP static unsigned bitmapId = 0; |