From: Fridrich S. <str...@us...> - 2008-12-05 15:17:33
|
Update of /cvsroot/libwpg/libwpg/src/conv/raw In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12685/src/conv/raw Modified Files: wpg2raw.cpp Log Message: committing work done in the train while having wireless access Index: wpg2raw.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/conv/raw/wpg2raw.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- wpg2raw.cpp 5 Dec 2008 00:53:49 -0000 1.21 +++ wpg2raw.cpp 5 Dec 2008 15:17:25 -0000 1.22 @@ -31,7 +31,7 @@ #include "libwpg.h" #include <libwpd-stream/libwpd-stream.h> #include <libwpd/libwpd.h> -#include "WPGBrush.h" +#include "WPGGradient.h" class RawPainter : public libwpg::WPGPaintInterface { public: @@ -44,7 +44,7 @@ void startEmbeddedGraphics(const ::WPXPropertyList& propList); void endEmbeddedGraphics(); - void setStyle(const libwpg::WPGPen& pen, const libwpg::WPGBrush& brush, const ::WPXPropertyList &propList); + void setStyle(const libwpg::WPGDashArray& dashArray, const libwpg::WPGGradient& gradient, const ::WPXPropertyList &propList); void drawRectangle(const ::WPXPropertyList &propList); void drawEllipse(const ::WPXPropertyList& propList); @@ -135,18 +135,15 @@ printf("RawPainter::endEmbeddedGraphics \n"); } -void RawPainter::setStyle(const libwpg::WPGPen& pen, const libwpg::WPGBrush& brush, const ::WPXPropertyList &propList) +void RawPainter::setStyle(const libwpg::WPGDashArray& dashArray, const libwpg::WPGGradient& gradient, const ::WPXPropertyList &propList) { - libwpg::WPGBrush tmpBrush = brush; + libwpg::WPGGradient tmpGradient = gradient; printf("RawPainter::setStyle(%s)\n", getPropString(propList).cstr()); - printf(" Foreground color: RGB %s Opacity %f\n", tmpBrush.foreColor.cstr(), tmpBrush.foreOpacity); - printf(" Background color: RGB %s Opacity %f\n", tmpBrush.backColor.cstr(), tmpBrush.backOpacity); - if(propList["draw:fill"] && propList["draw:fill"]->getStr() == "gradient") - for(unsigned c = 0; c < tmpBrush.gradient.count(); c++) + for(unsigned c = 0; c < tmpGradient.count(); c++) printf(" Gradient stop %d: %f RGB %s Opacity %f\n", c+1, - tmpBrush.gradient.stopOffset(c), tmpBrush.gradient.stopColor(c).cstr(), tmpBrush.gradient.stopOpacity(c)); + tmpGradient.stopOffset(c), tmpGradient.stopColor(c).cstr(), tmpGradient.stopOpacity(c)); } void RawPainter::drawRectangle(const ::WPXPropertyList &propList) |