Update of /cvsroot/libwpg/libwpg/src/conv/raw
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7706/src/conv/raw
Modified Files:
wpg2raw.cpp
Log Message:
remove public access from class WPGColor
Index: wpg2raw.cpp
===================================================================
RCS file: /cvsroot/libwpg/libwpg/src/conv/raw/wpg2raw.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- wpg2raw.cpp 3 Dec 2008 23:05:05 -0000 1.19
+++ wpg2raw.cpp 4 Dec 2008 23:17:39 -0000 1.20
@@ -31,6 +31,7 @@
#include "libwpg.h"
#include <libwpd-stream/libwpd-stream.h>
#include <libwpd/libwpd.h>
+#include "WPGBrush.h"
class RawPainter : public libwpg::WPGPaintInterface {
public:
@@ -136,26 +137,25 @@
void RawPainter::setStyle(const libwpg::WPGPen& pen, const libwpg::WPGBrush& brush, const ::WPXPropertyList &propList)
{
+ libwpg::WPGBrush tmpBrush = brush;
printf("RawPainter::setStyle(%s)\n", getPropString(propList).cstr());
printf(" Brush style: ");
- switch(brush.style)
- {
- case libwpg::WPGBrush::NoBrush: printf("none"); break;
- case libwpg::WPGBrush::Solid: printf("solid"); break;
- case libwpg::WPGBrush::Pattern: printf("pattern"); break;
- case libwpg::WPGBrush::Gradient: printf("gradient"); break;
- default: printf("unknown"); break;
- }
+
+ if (tmpBrush.style == "none" || tmpBrush.style == "solid" || tmpBrush.style == "bitmap" || tmpBrush.style == "gradient")
+ printf(tmpBrush.style.cstr());
+ else
+ printf("unknown");
+
printf("\n");
- printf(" Foreground color: RGB %s\n", brush.foreColor.getColorString().cstr());
- printf(" Background color: RGB %s\n", brush.backColor.getColorString().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(brush.style == libwpg::WPGBrush::Gradient)
- for(unsigned c = 0; c < brush.gradient.count(); c++)
+ if(tmpBrush.style == "gradient")
+ for(unsigned c = 0; c < tmpBrush.gradient.count(); c++)
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));
+ tmpBrush.gradient.stopOffset(c), tmpBrush.gradient.stopColor(c).cstr(), tmpBrush.gradient.stopOpacity(c));
}
void RawPainter::drawRectangle(const ::WPXPropertyList &propList)
|