summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/libwpg/WPGPen.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2007-02-25 06:54:05 +0000
committergouldtj <gouldtj@users.sourceforge.net>2007-02-25 06:54:05 +0000
commit3075cb6ff679e7efe68d17109a3608c692e44090 (patch)
tree8f33748e591f51dfdb7dd4f0dc8732b0fc602f3b /src/extension/internal/libwpg/WPGPen.cpp
parentAdd flood fill tool (diff)
downloadinkscape-3075cb6ff679e7efe68d17109a3608c692e44090.tar.gz
inkscape-3075cb6ff679e7efe68d17109a3608c692e44090.zip
r14551@tres: ted | 2007-02-24 15:22:47 -0800
Merging in the latest libwpg and some code chages to make it work with everything. (bzr r2433)
Diffstat (limited to 'src/extension/internal/libwpg/WPGPen.cpp')
-rw-r--r--src/extension/internal/libwpg/WPGPen.cpp71
1 files changed, 60 insertions, 11 deletions
diff --git a/src/extension/internal/libwpg/WPGPen.cpp b/src/extension/internal/libwpg/WPGPen.cpp
index f59fda661..b7bb6f7c7 100644
--- a/src/extension/internal/libwpg/WPGPen.cpp
+++ b/src/extension/internal/libwpg/WPGPen.cpp
@@ -36,41 +36,90 @@ public:
};
}
-using namespace libwpg;
-
-WPGDashArray::WPGDashArray()
+libwpg::WPGDashArray::WPGDashArray() : d(new libwpg::WPGDashArrayPrivate())
{
- d = new WPGDashArrayPrivate;
}
-WPGDashArray::~WPGDashArray()
+libwpg::WPGDashArray::~WPGDashArray()
{
delete d;
}
-WPGDashArray::WPGDashArray(const WPGDashArray& dash)
+libwpg::WPGDashArray::WPGDashArray(const libwpg::WPGDashArray& dash):
+ d(new libwpg::WPGDashArrayPrivate())
{
- d = new WPGDashArrayPrivate;
d->dashes = dash.d->dashes;
}
-WPGDashArray& WPGDashArray::operator=(const WPGDashArray& dash)
+libwpg::WPGDashArray& libwpg::WPGDashArray::operator=(const libwpg::WPGDashArray& dash)
{
d->dashes = dash.d->dashes;
return *this;
}
-unsigned WPGDashArray::count() const
+unsigned libwpg::WPGDashArray::count() const
{
return d->dashes.size();
}
-double WPGDashArray::at(unsigned i) const
+double libwpg::WPGDashArray::at(unsigned i) const
{
return d->dashes[i];
}
-void WPGDashArray::add(double p)
+void libwpg::WPGDashArray::add(double p)
{
d->dashes.push_back(p);
}
+
+libwpg::WPGPen::WPGPen():
+ foreColor(0,0,0),
+ backColor(0xFF,0xFF,0xFF),
+ width(0),
+ height(0),
+ solid(true) ,
+ dashArray(WPGDashArray())
+{
+}
+
+libwpg::WPGPen::WPGPen(const WPGColor& fore):
+ foreColor(fore),
+ backColor(0xFF,0xFF,0xFF),
+ width(0),
+ height(0),
+ solid(true),
+ dashArray(WPGDashArray())
+{
+}
+
+libwpg::WPGPen::WPGPen(const WPGColor& fore, const WPGColor& back):
+ foreColor(fore),
+ backColor(back),
+ width(0),
+ height(0),
+ solid(true) ,
+ dashArray(WPGDashArray())
+{
+}
+
+libwpg::WPGPen::WPGPen(const WPGPen& pen):
+ foreColor(pen.foreColor),
+ backColor(pen.backColor),
+ width(pen.width),
+ height(pen.height),
+ solid(pen.solid),
+ dashArray(pen.dashArray)
+{
+}
+
+libwpg::WPGPen& libwpg::WPGPen::operator=(const libwpg::WPGPen& pen)
+{
+ foreColor = pen.foreColor;
+ backColor = pen.backColor;
+ width = pen.width;
+ height = pen.height;
+ solid = pen.solid;
+ dashArray = pen.dashArray;
+ return *this;
+}
+