From: Fridrich S. <str...@us...> - 2008-12-03 23:05:11
|
Update of /cvsroot/libwpg/libwpg/src/conv/raw In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5477/src/conv/raw Modified Files: wpg2raw.cpp Log Message: transforming rgb(XX,YY,ZZ) to #XXYYZZ (still need to handle the default brush correctly) Index: wpg2raw.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/conv/raw/wpg2raw.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- wpg2raw.cpp 28 Nov 2008 12:25:45 -0000 1.18 +++ wpg2raw.cpp 3 Dec 2008 23:05:05 -0000 1.19 @@ -40,8 +40,8 @@ void endGraphics(); void startLayer(const ::WPXPropertyList& propList); void endLayer(); - void startEmbeddedGraphics(const ::WPXPropertyList& /*propList*/) {} - void endEmbeddedGraphics() {} + void startEmbeddedGraphics(const ::WPXPropertyList& propList); + void endEmbeddedGraphics(); void setStyle(const libwpg::WPGPen& pen, const libwpg::WPGBrush& brush, const ::WPXPropertyList &propList); @@ -124,6 +124,16 @@ printf("RawPainter::endLayer\n"); } +void RawPainter::startEmbeddedGraphics(const ::WPXPropertyList& propList) +{ + printf("RawPainter::startEmbeddedGraphics (%s)\n", getPropString(propList).cstr()); +} + +void RawPainter::endEmbeddedGraphics() +{ + printf("RawPainter::endEmbeddedGraphics \n"); +} + void RawPainter::setStyle(const libwpg::WPGPen& pen, const libwpg::WPGBrush& brush, const ::WPXPropertyList &propList) { printf("RawPainter::setStyle(%s)\n", getPropString(propList).cstr()); @@ -139,16 +149,13 @@ } printf("\n"); - printf(" Foreground color: RGB %d %d %d\n", brush.foreColor.red, - brush.foreColor.green, brush.foreColor.blue); - printf(" Background color: RGB %d %d %d\n", brush.backColor.red, - brush.backColor.green, brush.backColor.blue); + printf(" Foreground color: RGB %s\n", brush.foreColor.getColorString().cstr()); + printf(" Background color: RGB %s\n", brush.backColor.getColorString().cstr()); if(brush.style == libwpg::WPGBrush::Gradient) for(unsigned c = 0; c < brush.gradient.count(); c++) - printf(" Gradient stop %d: %f RGB %d %d %d\n", c+1, - brush.gradient.stopOffset(c), brush.gradient.stopColor(c).red, - brush.gradient.stopColor(c).green, brush.gradient.stopColor(c).blue); + printf(" Gradient stop %d: %f RGB %s Opacity %f\n", c+1, + brush.gradient.stopOffset(c), brush.gradient.stopColor(c).cstr(), brush.gradient.stopOpacity(c)); } void RawPainter::drawRectangle(const ::WPXPropertyList &propList) |