From: Fridrich S. <str...@us...> - 2008-12-03 23:14:51
|
Update of /cvsroot/libwpg/libwpg/src/lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7113/src/lib Modified Files: Makefile.am WPGPen.cpp WPGPen.h Added Files: WPGDashArray.cpp WPGDashArray.h Log Message: taking WPGDashArray from WPGPen.{cpp,h} into a separate file Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/Makefile.am,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Makefile.am 28 Nov 2008 11:53:03 -0000 1.32 +++ Makefile.am 3 Dec 2008 23:14:46 -0000 1.33 @@ -24,6 +24,7 @@ libwpg.h \ WPGraphics.h \ WPGColor.h \ + WPGDashArray.h \ WPGPen.h \ WPGBrush.h \ WPGGradient.h \ @@ -39,6 +40,7 @@ WPGBrush.cpp \ WPGPen.cpp \ WPGColor.cpp \ + WPGDashArray.cpp \ WPGGradient.cpp \ WPGHeader.cpp \ WPGSVGGenerator.cpp \ --- NEW FILE: WPGDashArray.h --- /* libwpg * Copyright (C) 2006 Ariya Hidayat (ar...@kd...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02111-1301 USA * * For further information visit http://libwpg.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #ifndef __WPGDASHARRAY_H__ #define __WPGDASHARRAY_H__ namespace libwpg { class WPGDashArrayPrivate; class WPGDashArray { public: WPGDashArray(); ~WPGDashArray(); WPGDashArray(const WPGDashArray&); WPGDashArray& operator=(const WPGDashArray&); unsigned count() const; double at(unsigned i) const; void add(double p); private: WPGDashArrayPrivate *d; }; } // namespace libwpg #endif // __WPGDASHARRAY_H__ --- NEW FILE: WPGDashArray.cpp --- /* libwpg * Copyright (C) 2006 Ariya Hidayat (ar...@kd...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02111-1301 USA * * For further information visit http://libwpg.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #include "WPGDashArray.h" #include <vector> namespace libwpg { class WPGDashArrayPrivate { public: WPGDashArrayPrivate() : dashes(std::vector<double>()) {}; std::vector<double> dashes; }; } libwpg::WPGDashArray::WPGDashArray() : d(new libwpg::WPGDashArrayPrivate()) { } libwpg::WPGDashArray::~WPGDashArray() { delete d; } libwpg::WPGDashArray::WPGDashArray(const libwpg::WPGDashArray& dash): d(new libwpg::WPGDashArrayPrivate()) { d->dashes = dash.d->dashes; } libwpg::WPGDashArray& libwpg::WPGDashArray::operator=(const libwpg::WPGDashArray& dash) { d->dashes = dash.d->dashes; return *this; } unsigned libwpg::WPGDashArray::count() const { return d->dashes.size(); } double libwpg::WPGDashArray::at(unsigned i) const { return d->dashes[i]; } void libwpg::WPGDashArray::add(double p) { d->dashes.push_back(p); } Index: WPGPen.cpp =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGPen.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- WPGPen.cpp 28 Nov 2008 11:53:03 -0000 1.9 +++ WPGPen.cpp 3 Dec 2008 23:14:46 -0000 1.10 @@ -27,52 +27,6 @@ #include <vector> -namespace libwpg -{ -class WPGDashArrayPrivate -{ -public: - WPGDashArrayPrivate() : dashes(std::vector<double>()) {}; - std::vector<double> dashes; -}; -} - -libwpg::WPGDashArray::WPGDashArray() : d(new libwpg::WPGDashArrayPrivate()) -{ -} - -libwpg::WPGDashArray::~WPGDashArray() -{ - delete d; -} - -libwpg::WPGDashArray::WPGDashArray(const libwpg::WPGDashArray& dash): - d(new libwpg::WPGDashArrayPrivate()) -{ - d->dashes = dash.d->dashes; -} - -libwpg::WPGDashArray& libwpg::WPGDashArray::operator=(const libwpg::WPGDashArray& dash) -{ - d->dashes = dash.d->dashes; - return *this; -} - -unsigned libwpg::WPGDashArray::count() const -{ - return d->dashes.size(); -} - -double libwpg::WPGDashArray::at(unsigned i) const -{ - return d->dashes[i]; -} - -void libwpg::WPGDashArray::add(double p) -{ - d->dashes.push_back(p); -} - libwpg::WPGPen::WPGPen(): foreColor(0,0,0), backColor(0xFF,0xFF,0xFF), Index: WPGPen.h =================================================================== RCS file: /cvsroot/libwpg/libwpg/src/lib/WPGPen.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- WPGPen.h 28 Nov 2008 11:53:03 -0000 1.5 +++ WPGPen.h 3 Dec 2008 23:14:46 -0000 1.6 @@ -27,27 +27,11 @@ #define __WPGPEN_H__ #include "WPGColor.h" +#include "WPGDashArray.h" namespace libwpg { -class WPGDashArrayPrivate; - -class WPGDashArray -{ -public: - WPGDashArray(); - ~WPGDashArray(); - WPGDashArray(const WPGDashArray&); - WPGDashArray& operator=(const WPGDashArray&); - unsigned count() const; - double at(unsigned i) const; - void add(double p); - -private: - WPGDashArrayPrivate *d; -}; - class WPGPen { public: |