00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef POLYGON_SYMBOLIZER_HPP
00026 #define POLYGON_SYMBOLIZER_HPP
00027
00028 #include <mapnik/color.hpp>
00029
00030 namespace mapnik
00031 {
00032 struct MAPNIK_DECL polygon_symbolizer
00033 {
00034 explicit polygon_symbolizer()
00035 : fill_(Color(128,128,128)),
00036 opacity_(1.0) {}
00037
00038 polygon_symbolizer(Color const& fill)
00039 : fill_(fill),
00040 opacity_(1.0) {}
00041
00042 Color const& get_fill() const
00043 {
00044 return fill_;
00045 }
00046 void set_fill(Color const& fill)
00047 {
00048 fill_ = fill;
00049 }
00050 void set_opacity(float opacity)
00051 {
00052 opacity_ = opacity;
00053 }
00054 float get_opacity() const
00055 {
00056 return opacity_;
00057 }
00058 private:
00059 Color fill_;
00060 float opacity_;
00061 };
00062
00063 struct MAPNIK_DECL building_symbolizer
00064 {
00065 explicit building_symbolizer()
00066 : fill_(Color(128,128,128)),
00067 height_(0),
00068 opacity_(1.0)
00069 {}
00070
00071 building_symbolizer(Color const& fill,double height)
00072 : fill_(fill),
00073 height_(height),
00074 opacity_(1.0) {}
00075
00076 Color const& get_fill() const
00077 {
00078 return fill_;
00079 }
00080 void set_fill(Color const& fill)
00081 {
00082 fill_ = fill;
00083 }
00084 double height() const
00085 {
00086 return height_;
00087 }
00088 void set_height(double height)
00089 {
00090 height_=height;
00091 }
00092 void set_opacity(float opacity)
00093 {
00094 opacity_ = opacity;
00095 }
00096 float get_opacity() const
00097 {
00098 return opacity_;
00099 }
00100 private:
00101 Color fill_;
00102 double height_;
00103 float opacity_;
00104 };
00105 }
00106
00107 #endif // POLYGON_SYMBOLIZER_HPP