00001 #pragma ident "$Id: Fillable.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_FILLABLE_H 00029 #define VDRAW_FILLABLE_H 00030 00031 #include "BasicShape.hpp" 00032 00033 namespace vdraw 00034 { 00037 00044 class Fillable : public BasicShape { 00045 00046 public: 00047 00055 Fillable(void) 00056 : BasicShape(), hasFillColor(false) 00057 {} 00058 00063 Fillable(const StrokeStyle& istyle) 00064 : BasicShape(istyle), hasFillColor(false) 00065 {} 00066 00071 Fillable(const Color& ifillColor) 00072 : BasicShape(), fillColor(ifillColor), hasFillColor(true) 00073 {} 00074 00080 Fillable(const StrokeStyle& istyle, const Color& ifillColor) 00081 : BasicShape(istyle), fillColor(ifillColor), hasFillColor(true) 00082 {} 00083 00085 inline bool hasOwnFillColor(void) const { return hasFillColor; } 00086 00088 inline Color getFillColor(void) const { return fillColor; } 00089 00091 inline void setFillColor(const Color& ifillColor) { fillColor=ifillColor;hasFillColor=true; } 00092 00094 inline void removeFillColor(void) { hasFillColor=false; } 00095 00096 protected: 00097 00099 Color fillColor; 00100 00102 bool hasFillColor; 00103 00104 private: 00105 00106 00107 }; // class Fillable 00108 00110 00111 } // namespace vdraw 00112 00113 #endif //VDRAW_FILLABLE_H 00114 00115 00116
1.3.9.1