Update of /cvsroot/libwpg/perfectspot/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15132/src
Modified Files:
renderer.cpp
Log Message:
adapting perfectspot to the status of the libwpg code
Index: renderer.cpp
===================================================================
RCS file: /cvsroot/libwpg/perfectspot/src/renderer.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- renderer.cpp 5 Dec 2008 15:18:24 -0000 1.18
+++ renderer.cpp 7 Sep 2009 15:16:52 -0000 1.19
@@ -52,7 +52,7 @@
void startEmbeddedGraphics(const ::WPXPropertyList& /*propList*/) {}
void endEmbeddedGraphics() {}
- void setStyle(const libwpg::WPGDashArray& pen, const libwpg::WPGGradient& gradient, const ::WPXPropertyList &propList);
+ void setStyle(const WPXPropertyListVector& gradient, const ::WPXPropertyList &propList);
void drawRectangle(const ::WPXPropertyList &propList);
void drawEllipse(const ::WPXPropertyList& propList);
@@ -84,7 +84,7 @@
m_zoomY = m_target->viewport().height() / height;
}
-void Painter::setStyle(const libwpg::WPGDashArray& dashArray, const libwpg::WPGGradient& gradient, const ::WPXPropertyList &propList)
+void Painter::setStyle(const WPXPropertyListVector& gradient, const ::WPXPropertyList &propList)
{
QPen ppen(Qt::SolidLine);
@@ -98,7 +98,7 @@
QColor cPen(propList["svg:stroke-color"]->getStr().cstr());
ppen.setColor(cPen);
}
-
+#if 0
if(!propList["libwpg:stroke-solid"] || !propList["libwpg:stroke-solid"]->getInt())
{
QVector<qreal> dashes;
@@ -106,7 +106,7 @@
dashes.append(dashArray.at(i));
ppen.setDashPattern(dashes);
}
-
+#endif
m_target->setPen(ppen);
QBrush pbrush(Qt::SolidPattern);
@@ -127,14 +127,14 @@
{
QLinearGradient pgradient(0, 0, 0, 1);
for(unsigned c = 0; c < gradient.count(); c++)
- pgradient.setColorAt(gradient.stopOffset(c), QColor(gradient.stopColor(c).cstr()));
+ pgradient.setColorAt(gradient[c]["svg:stop-offset"]->getDouble(), QColor(gradient[c]["svg:stop-color"]->getStr().cstr()));
#if QT_VERSION >= 0x040300
pgradient.setCoordinateMode(QLinearGradient::ObjectBoundingMode);
#endif
pbrush = QBrush(pgradient);
#if QT_VERSION >= 0x040300
QMatrix matrix;
- matrix.rotate(gradient.angle());
+ matrix.rotate(propList["draw:angle"] ? -propList["draw:angle"]->getDouble() : 0.0);
pbrush.setMatrix(matrix);
#endif
}
|