StrokeStyle.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: StrokeStyle.hpp 1644 2009-01-27 19:26:14Z ckiesch $"
00002 
00004 
00005 //============================================================================
00006 //
00007 //  This file is part of GPSTk, the GPS Toolkit.
00008 //
00009 //  The GPSTk is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU Lesser General Public License as published
00011 //  by the Free Software Foundation; either version 2.1 of the License, or
00012 //  any later version.
00013 //
00014 //  The GPSTk is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 //  GNU Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with GPSTk; if not, write to the Free Software Foundation,
00021 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //  
00023 //  Copyright 2004, The University of Texas at Austin
00024 //
00025 //============================================================================
00026 
00027 
00028 #ifndef VDRAW_STROKESTYLE_H
00029 #define VDRAW_STROKESTYLE_H
00030 
00031 #include<string>
00032 #include<list>
00033 
00034 #include "Color.hpp"
00035 
00036 namespace vdraw
00037 {
00040 
00041 
00046    class StrokeStyle {
00047 
00048    public:
00049       
00055      typedef std::list<double> dashLengthList;
00056    
00060      StrokeStyle(void);
00061 
00067      StrokeStyle( const Color& icolor, 
00068                   double iwidth=1 ); 
00069 
00076      StrokeStyle( const Color& icolor, 
00077                   double iwidth,
00078                   const dashLengthList& dll  ); 
00079 
00101      StrokeStyle(const std::string& strSpec) {}
00102 
00104      static StrokeStyle clear() { return StrokeStyle(Color::CLEAR); };
00105 
00107      bool operator==(const StrokeStyle& rhs) const
00108      { return ((color==rhs.color)&&(width==rhs.width)&&(dashList==rhs.dashList)); }
00109 
00111      bool operator!=(const StrokeStyle& rhs) const
00112      { return !((*this)==rhs); }
00113 
00115      Color getColor(void) const { return color; }
00116 
00118      double getWidth(void) const { return width; }
00119 
00121      bool getSolid(void) const { return solid; }
00122 
00124      dashLengthList getDashList(void) const { return dashList; }
00125 
00126    protected:
00127 
00129       Color color;
00130 
00132       double width;   
00133 
00135       bool solid;
00136 
00138       dashLengthList dashList;
00139 
00140    private:
00141 
00142 
00143    }; // class StrokeStyle
00144 
00146 
00147 } // namespace vdraw
00148 
00149 #endif //VDRAW_STROKESTYLE_H
00150 

Generated on Wed Feb 8 03:31:03 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1