From: Fridrich S. <str...@us...> - 2009-09-07 09:41:42
|
Update of /cvsroot/libwpg/libwpg/src/lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32646/src/lib Modified Files: WPG1Parser.cpp WPG2Parser.cpp WPG2Parser.h WPGBitmap.cpp WPGBitmap.h WPGPaintInterface.h WPGSVGGenerator.cpp WPGSVGGenerator.h Log Message: Adding the image resolutions to the generated DIB + starting to rework the dash-array to remove the public accessibility of the class Index: WPG2Parser.h =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPG2Parser.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- WPG2Parser.h 7 Sep 2009 08:10:18 -0000 1.36 +++ WPG2Parser.h 7 Sep 2009 09:41:29 -0000 1.37 @@ -163,6 +163,7 @@ private: void handleStartWPG(); void handleEndWPG(); + void handleFormSettings(); void handleLayer(); void handleCompoundPolygon(); @@ -177,6 +178,8 @@ void handlePenStyle(); void handlePenSize(); void handleDPPenSize(); + void handleLineCap(); + void handleLineJoin(); void handleBrushGradient(); void handleDPBrushGradient(); void handleBrushForeColor(); Index: WPGBitmap.h =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGBitmap.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- WPGBitmap.h 28 Nov 2008 11:53:03 -0000 1.11 +++ WPGBitmap.h 7 Sep 2009 09:41:29 -0000 1.12 @@ -36,7 +36,7 @@ class WPGBitmap { public: - WPGBitmap(int width, int height, bool verticalFlip=false, bool horizontalFlip=false); + WPGBitmap(int width, int height, int verticalResolution, int horizontalResolution, bool verticalFlip=false, bool horizontalFlip=false); WPGBitmap(const WPGBitmap&); @@ -51,7 +51,13 @@ // return height in pixel int height() const; + + // return vertical resolution in pixels per inch + int vres() const; + // return horizontal resolution in pixels per inch + int hres() const; + void setPixel(int x, int y, const WPGColor& color); const ::WPXBinaryData& getDIB() const; Index: WPGSVGGenerator.h =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGSVGGenerator.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- WPGSVGGenerator.h 7 Sep 2009 08:10:18 -0000 1.21 +++ WPGSVGGenerator.h 7 Sep 2009 09:41:29 -0000 1.22 @@ -47,7 +47,7 @@ void startEmbeddedGraphics(const ::WPXPropertyList & /*propList*/) {} void endEmbeddedGraphics() {} - void setStyle(const libwpg::WPGDashArray& dashArray, const ::WPXPropertyListVector& gradient, const ::WPXPropertyList &propList); + void setStyle(const ::WPXPropertyListVector& gradient, const ::WPXPropertyList &propList); void drawRectangle(const ::WPXPropertyList& propList); void drawEllipse(const ::WPXPropertyList& propList); @@ -57,7 +57,6 @@ void drawImageObject(const ::WPXPropertyList &propList, const ::WPXBinaryData& binaryData); private: - libwpg::WPGDashArray m_dashArray; ::WPXPropertyListVector m_gradient; ::WPXPropertyList m_style; int m_gradientIndex; Index: WPGBitmap.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGBitmap.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- WPGBitmap.cpp 3 Dec 2008 23:05:05 -0000 1.25 +++ WPGBitmap.cpp 7 Sep 2009 09:41:29 -0000 1.26 @@ -27,7 +27,7 @@ #include "WPGBitmap.h" #include "libwpg_utils.h" -#define DUMP_BITMAP 0 +#define DUMP_BITMAP 1 #if DUMP_BITMAP static unsigned bitmapId = 0; @@ -62,17 +62,21 @@ public: int width; int height; + int vRes; + int hRes; bool vFlip; bool hFlip; WPGColor* pixels; ::WPXBinaryData dib; - Private(int w, int h): width(w), height(h), vFlip(false), hFlip(false), pixels(0), dib() {} + Private(int w, int h): width(w), height(h), vRes(72), hRes(72), vFlip(false), hFlip(false), pixels(0), dib() {} }; -libwpg::WPGBitmap::WPGBitmap(int w, int h, bool verticalFlip, bool horizontalFlip) : +libwpg::WPGBitmap::WPGBitmap(int w, int h, int verticalResolution, int horizontalResolution, bool verticalFlip, bool horizontalFlip) : d(new Private(w, h)) { + d->vRes = verticalResolution; + d->hRes = horizontalResolution; d->vFlip = verticalFlip; d->hFlip = horizontalFlip; d->pixels = new WPGColor[w*h]; @@ -119,6 +123,16 @@ return d->height; } +int libwpg::WPGBitmap::vres() const +{ + return d->vRes; +} + +int libwpg::WPGBitmap::hres() const +{ + return d->hRes; +} + void libwpg::WPGBitmap::setPixel(int x, int y, const libwpg::WPGColor& color) { if((x < 0) || (y <0) || (x >= d->width) || (y >= d->height)) @@ -165,8 +179,8 @@ writeU16(tmpDIBBuffer, tmpBufferPosition, 32); // BitCount writeU32(tmpDIBBuffer, tmpBufferPosition, 0); // Compression writeU32(tmpDIBBuffer, tmpBufferPosition, tmpDIBImageSize); // SizeImage - writeU32(tmpDIBBuffer, tmpBufferPosition, 0); // XPelsPerMeter - writeU32(tmpDIBBuffer, tmpBufferPosition, 0); // YPelsPerMeter + writeU32(tmpDIBBuffer, tmpBufferPosition, (int)(hres()*100.0/2.54)); // XPelsPerMeter + writeU32(tmpDIBBuffer, tmpBufferPosition, (int)(vres()*100.0/2.54)); // YPelsPerMeter writeU32(tmpDIBBuffer, tmpBufferPosition, 0); // ColorsUsed writeU32(tmpDIBBuffer, tmpBufferPosition, 0); // ColorsImportant Index: WPGSVGGenerator.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGSVGGenerator.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- WPGSVGGenerator.cpp 7 Sep 2009 08:10:18 -0000 1.33 +++ WPGSVGGenerator.cpp 7 Sep 2009 09:41:29 -0000 1.34 @@ -47,7 +47,7 @@ } -libwpg::WPGSVGGenerator::WPGSVGGenerator(std::ostream & output_sink): m_dashArray(libwpg::WPGDashArray()), m_gradient(), m_style(), m_gradientIndex(1), m_outputSink(output_sink) +libwpg::WPGSVGGenerator::WPGSVGGenerator(std::ostream & output_sink): m_gradient(), m_style(), m_gradientIndex(1), m_outputSink(output_sink) { } @@ -79,12 +79,10 @@ m_outputSink << "</svg>\n"; } -void libwpg::WPGSVGGenerator::setStyle(const libwpg::WPGDashArray& dashArray, const ::WPXPropertyListVector& gradient, const ::WPXPropertyList &propList) +void libwpg::WPGSVGGenerator::setStyle(const ::WPXPropertyListVector& gradient, const ::WPXPropertyList &propList) { m_style = propList; - m_dashArray = dashArray; - m_gradient = gradient; if(propList["draw:fill"] && propList["draw:fill"]->getStr() == "gradient") @@ -278,6 +276,7 @@ if(!m_style["draw:stroke"] || !(m_style["draw:stroke"]->getStr() == "solid")) { +#if 0 if (m_dashArray.count()) { m_outputSink << "stroke-dasharray: "; @@ -289,6 +288,7 @@ } m_outputSink << "; "; } +#endif } if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "none") Index: WPGPaintInterface.h =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGPaintInterface.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- WPGPaintInterface.h 7 Sep 2009 08:10:18 -0000 1.19 +++ WPGPaintInterface.h 7 Sep 2009 09:41:29 -0000 1.20 @@ -40,7 +40,7 @@ // none of the other callback functions will be called before this function is called virtual void startGraphics(const ::WPXPropertyList &propList) = 0; - virtual void setStyle(const WPGDashArray& dashArray, const ::WPXPropertyListVector& gradient, const ::WPXPropertyList &propList) = 0; + virtual void setStyle(const ::WPXPropertyListVector& gradient, const ::WPXPropertyList &propList) = 0; virtual void startLayer(const ::WPXPropertyList& propList) = 0; Index: WPG2Parser.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPG2Parser.cpp,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- WPG2Parser.cpp 7 Sep 2009 08:10:18 -0000 1.99 +++ WPG2Parser.cpp 7 Sep 2009 09:41:29 -0000 1.100 @@ -277,7 +277,7 @@ { { 0x01, "Start WPG", &WPG2Parser::handleStartWPG }, { 0x02, "End WPG", &WPG2Parser::handleEndWPG }, - { 0x03, "Form Settings", 0 }, // ignored + { 0x03, "Form Settings", &WPG2Parser::handleFormSettings }, { 0x04, "Ruler Settings", 0 }, // ignored { 0x05, "Grid Settings", 0 }, // ignored { 0x06, "Layer", &WPG2Parser::handleLayer }, @@ -314,8 +314,8 @@ { 0x2a, "Pen Pattern", 0 }, { 0x2b, "Pen Size", &WPG2Parser::handlePenSize }, { 0x2c, "DP Pen Size", &WPG2Parser::handleDPPenSize }, - { 0x2d, "Line Cap", 0 }, - { 0x2e, "Line Join", 0 }, + { 0x2d, "Line Cap", &WPG2Parser::handleLineCap }, + { 0x2e, "Line Join", &WPG2Parser::handleLineJoin }, { 0x2f, "Brush Gradient", &WPG2Parser::handleBrushGradient }, { 0x30, "DP Brush Gradient", &WPG2Parser::handleDPBrushGradient }, { 0x31, "Brush Fore Color", &WPG2Parser::handleBrushForeColor }, @@ -514,7 +514,7 @@ m_width = (imageX2 > imageX1 ) ? imageX2-imageX1 : imageX1-imageX2; m_height = (imageY2 > imageY1) ? imageY2-imageY1 : imageY1-imageY2; - WPG_DEBUG_MSG(("StartWPG\n")); + WPG_DEBUG_MSG(("StartWPG 2\n")); WPG_DEBUG_MSG((" Horizontal unit of measure : %d pixels/inch\n", horizontalUnit)); WPG_DEBUG_MSG((" Vertical unit of measure : %d pixels/inch\n", verticalUnit)); WPG_DEBUG_MSG((" Data precision : %d (%s)\n", precision, describePrecision(precision))); @@ -584,6 +584,28 @@ m_exit = true; } +void WPG2Parser::handleFormSettings() +{ +#ifdef DEBUG + unsigned int w = (m_doublePrecision) ? readU32() : readU16(); + unsigned int h = (m_doublePrecision) ? readU32() : readU16(); + double width = (TO_DOUBLE(w)) / m_xres; + double height = (TO_DOUBLE(h)) / m_yres; + m_input->seek(((m_doublePrecision) ? 4 : 2), WPX_SEEK_CUR); + unsigned int ml = (m_doublePrecision) ? readU32() : readU16(); + unsigned int mr = (m_doublePrecision) ? readU32() : readU16(); + unsigned int mt = (m_doublePrecision) ? readU32() : readU16(); + unsigned int mb = (m_doublePrecision) ? readU32() : readU16(); + double margL = (TO_DOUBLE(ml)) / m_xres; + double margR = (TO_DOUBLE(mr)) / m_xres; + double margT = (TO_DOUBLE(mt)) / m_xres; + double margB = (TO_DOUBLE(mb)) / m_xres; + + WPG_DEBUG_MSG(("Form Settings: width: %f height : %f\n", width, height)); + WPG_DEBUG_MSG(("Form Margins: left: %f right : %f top: %f bottom: %f\n", margL, margR, margT, margB)); +#endif +} + void WPG2Parser::handleLayer() { if (!m_graphicsStarted) @@ -626,7 +648,7 @@ else m_style.insert("svg:fill-rule", "evenodd"); - m_painter->setStyle( context.compoundFramed ? m_dashArray : libwpg::WPGDashArray(), context.compoundFilled ? m_gradient : ::WPXPropertyListVector(), m_style ); + m_painter->setStyle( context.compoundFilled ? m_gradient : ::WPXPropertyListVector(), m_style ); if (context.compoundClosed) { @@ -710,8 +732,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned char red = readU8(); unsigned char green = readU8(); unsigned char blue = readU8(); @@ -726,8 +753,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } // we just ignore the least significant 8 bits unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); @@ -790,8 +822,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned int style = readU16(); m_dashArray = m_dashArrayStyles[style]; @@ -807,8 +844,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned int width = readU16(); m_style.insert("svg:stroke-width", (TO_DOUBLE(width) / m_xres)); @@ -820,8 +862,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned long width = readU32(); m_style.insert("svg:stroke-width", TO_DOUBLE(width) / m_xres / 256); @@ -830,12 +877,45 @@ WPG_DEBUG_MSG((" Width: %li\n", width)); } -void WPG2Parser::handleBrushGradient() +void WPG2Parser::handleLineCap() { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } + WPG_DEBUG_MSG((" Line cap : %d\n", style)); +} + +void WPG2Parser::handleLineJoin() +{ + if (!m_graphicsStarted) + return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } + WPG_DEBUG_MSG((" Line join : %d\n", style)); +} + +void WPG2Parser::handleBrushGradient() +{ + if (!m_graphicsStarted) return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned angleFraction = readU16(); unsigned angleInteger = readU16(); unsigned xref = readU16(); @@ -864,8 +944,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned angleFraction = readU16(); unsigned angleInteger = readU16(); unsigned xref = readU16(); @@ -894,8 +979,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned char gradientType = readU8(); WPG_DEBUG_MSG((" Gradient type : %d (%s)\n", gradientType, describeGradient(gradientType))); @@ -982,8 +1072,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } unsigned char gradientType = readU8(); WPG_DEBUG_MSG((" Gradient type : %d (%s)\n", gradientType, describeGradient(gradientType))); @@ -1115,8 +1210,13 @@ { if (!m_graphicsStarted) return; - if (!m_groupStack.empty() && m_groupStack.top().isCompoundPolygon()) - return; + if(!m_groupStack.empty()) + { + if (m_groupStack.top().isCompoundPolygon()) + return; + if (m_groupStack.top().parentType == 0x01) // we don't handle Page Attributes for now + return; + } #ifdef DEBUG unsigned int pattern = readU16(); #endif @@ -1197,6 +1297,9 @@ WPG_DEBUG_MSG((" rotate : %s\n", (ch->rotate ? "yes" : "no"))); WPG_DEBUG_MSG((" hasObjectId : %s\n", (ch->hasObjectId ? "yes" : "no"))); WPG_DEBUG_MSG((" editLock : %s\n", (ch->editLock ? "yes" : "no"))); + WPG_DEBUG_MSG((" closed : %s\n", (ch->closed ? "yes" : "no"))); + WPG_DEBUG_MSG((" framed : %s\n", (ch->framed ? "yes" : "no"))); + WPG_DEBUG_MSG((" filled : %s\n", (ch->filled ? "yes" : "no"))); #ifdef DEBUG if(ch->editLock) WPG_DEBUG_MSG((" lock flags : 0x%x\n", (unsigned)ch->lockFlags)); if(ch->hasObjectId) WPG_DEBUG_MSG((" object ID : 0x%x\n", (unsigned)ch->objectId)); @@ -1268,7 +1371,7 @@ m_style.insert("svg:fill-rule", "nonzero"); else m_style.insert("svg:fill-rule", "evenodd"); - m_painter->setStyle( objCh.framed ? m_dashArray : libwpg::WPGDashArray(), objCh.filled ? m_gradient : ::WPXPropertyListVector(), m_style ); + m_painter->setStyle( objCh.filled ? m_gradient : ::WPXPropertyListVector(), m_style ); if (objCh.filled || objCh.closed) m_painter->drawPolygon(points); else @@ -1276,7 +1379,7 @@ } else { - m_painter->setStyle( objCh.framed ? m_dashArray : libwpg::WPGDashArray(), ::WPXPropertyListVector(), m_style ); + m_painter->setStyle( ::WPXPropertyListVector(), m_style ); m_painter->drawPolyline(points); } } @@ -1366,7 +1469,7 @@ m_style.insert("svg:fill-rule", "nonzero"); else m_style.insert("svg:fill-rule", "evenodd"); - m_painter->setStyle( objCh.framed ? m_dashArray : libwpg::WPGDashArray(), objCh.filled ? m_gradient : ::WPXPropertyListVector(), m_style ); + m_painter->setStyle( objCh.filled ? m_gradient : ::WPXPropertyListVector(), m_style ); m_painter->drawPath(path); } } @@ -1404,7 +1507,7 @@ propList.insert("svg:rx", (TO_DOUBLE(rx)/m_xres)); propList.insert("svg:ry", (TO_DOUBLE(ry)/m_yres)); - m_painter->setStyle( objCh.framed ? m_dashArray : libwpg::WPGDashArray(), objCh.filled ? m_gradient : ::WPXPropertyListVector(), ::WPXPropertyList() ); + m_painter->setStyle( objCh.filled ? m_gradient : ::WPXPropertyListVector(), ::WPXPropertyList() ); m_painter->drawRectangle(propList); WPG_DEBUG_MSG((" X1 : %li\n", x1)); @@ -1446,7 +1549,7 @@ if (objCh.rotate) propList.insert("libwpg:rotate", (double)(objCh.rotationAngle)); - m_painter->setStyle( objCh.framed ? m_dashArray : libwpg::WPGDashArray(), objCh.filled ? m_gradient : ::WPXPropertyListVector(), ::WPXPropertyList() ); + m_painter->setStyle( objCh.filled ? m_gradient : ::WPXPropertyListVector(), ::WPXPropertyList() ); m_painter->drawEllipse(propList /* TODO: fix this: libwpg::WPGPoint((double)ix/m_xres, (double)iy/m_yres), libwpg::WPGPoint((double)ex/m_xres, (double)ey/m_yres) */); @@ -1495,8 +1598,12 @@ m_bitmap.y1 = TO_DOUBLE(ys1) / m_yres; m_bitmap.x2 = TO_DOUBLE(xs2) / m_xres; m_bitmap.y2 = TO_DOUBLE(ys2) / m_yres; - m_bitmap.hres = hres; - m_bitmap.vres = vres; + if (hres == 0) + hres = 72; + m_bitmap.hres = hres; + if (vres == 0) + vres = 72; + m_bitmap.vres = vres; WPG_DEBUG_MSG((" x1 : %li\n", x1)); WPG_DEBUG_MSG((" y1 : %li\n", y1)); Index: WPG1Parser.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPG1Parser.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- WPG1Parser.cpp 7 Sep 2009 08:10:18 -0000 1.60 +++ WPG1Parser.cpp 7 Sep 2009 09:41:29 -0000 1.61 @@ -391,7 +391,7 @@ point.insert("svg:y", (double)(m_height-ey)/1200.0); points.append(point); - m_painter->setStyle(m_dashArray, m_gradient, m_style); + m_painter->setStyle(m_gradient, m_style); m_painter->drawPolyline(points); @@ -418,7 +418,7 @@ points.append(point); } - m_painter->setStyle(m_dashArray, ::WPXPropertyListVector(), m_style); + m_painter->setStyle(::WPXPropertyListVector(), m_style); m_painter->drawPolyline(points); @@ -441,7 +441,7 @@ propList.insert("svg:width", (double)w/1200.0); propList.insert("svg:height",(double)h/1200.0); - m_painter->setStyle(m_dashArray, m_gradient, m_style); + m_painter->setStyle(m_gradient, m_style); m_painter->drawRectangle(propList); @@ -469,7 +469,7 @@ points.append(point); } - m_painter->setStyle(m_dashArray, m_gradient, m_style); + m_painter->setStyle(m_gradient, m_style); m_painter->drawPolygon(points); @@ -493,7 +493,7 @@ int endAngle = readS16(); unsigned flags = readU16(); #endif - m_painter->setStyle(m_dashArray, m_gradient, m_style); + m_painter->setStyle(m_gradient, m_style); m_painter->drawEllipse(propList); @@ -541,7 +541,7 @@ } - m_painter->setStyle(m_dashArray, m_gradient, m_style); + m_painter->setStyle(m_gradient, m_style); m_painter->drawPath(path); @@ -720,7 +720,7 @@ // Bitmap Type 1 does not specify position // Assume on the corner (0,0) - libwpg::WPGBitmap bitmap(width, height); + libwpg::WPGBitmap bitmap(width, height, vres, hres); ::WPXPropertyList propList; propList.insert("svg:x", 0.0); propList.insert("svg:y", 0.0); @@ -789,7 +789,7 @@ long ys2 = (y1 <= y2) ? y2 : y1; WPG_DEBUG_MSG(("%li %li %li %li\n", xs1, ys1, xs2, ys2)); - libwpg::WPGBitmap bitmap(width, height); + libwpg::WPGBitmap bitmap(width, height, vres, hres); ::WPXPropertyList propList; propList.insert("svg:x", (double)xs1/1200.0); propList.insert("svg:y", (double)(ys1)/1200.0); |