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 AGG_RENDERER_HPP
00026 #define AGG_RENDERER_HPP
00027
00028
00029 #include <boost/utility.hpp>
00030 #include <boost/shared_ptr.hpp>
00031
00032 #include <mapnik/config.hpp>
00033 #include <mapnik/feature_style_processor.hpp>
00034 #include <mapnik/font_engine_freetype.hpp>
00035 #include <mapnik/label_collision_detector.hpp>
00036 #include <mapnik/placement_finder.hpp>
00037 #include <mapnik/map.hpp>
00038
00039 namespace mapnik {
00040 template <typename T>
00041 class MAPNIK_DECL agg_renderer : public feature_style_processor<agg_renderer<T> >,
00042 private boost::noncopyable
00043 {
00044 public:
00045 agg_renderer(Map const& m, T & pixmap, unsigned offset_x=0, unsigned offset_y=0);
00046 void start_map_processing(Map const& map);
00047 void end_map_processing(Map const& map);
00048 void start_layer_processing(Layer const& lay);
00049 void end_layer_processing(Layer const& lay);
00050 void process(point_symbolizer const& sym,
00051 Feature const& feature,
00052 proj_transform const& prj_trans);
00053 void process(line_symbolizer const& sym,
00054 Feature const& feature,
00055 proj_transform const& prj_trans);
00056 void process(line_pattern_symbolizer const& sym,
00057 Feature const& feature,
00058 proj_transform const& prj_trans);
00059 void process(polygon_symbolizer const& sym,
00060 Feature const& feature,
00061 proj_transform const& prj_trans);
00062 void process(polygon_pattern_symbolizer const& sym,
00063 Feature const& feature,
00064 proj_transform const& prj_trans);
00065 void process(raster_symbolizer const& sym,
00066 Feature const& feature,
00067 proj_transform const& prj_trans);
00068 void process(shield_symbolizer const& sym,
00069 Feature const& feature,
00070 proj_transform const& prj_trans);
00071 void process(text_symbolizer const& sym,
00072 Feature const& feature,
00073 proj_transform const& prj_trans);
00074 private:
00075 T & pixmap_;
00076 CoordTransform t_;
00077 face_manager<freetype_engine> font_manager_;
00078 placement_finder finder_;
00079 label_collision_detector2 point_detector_;
00080 };
00081 }
00082
00083 #endif //AGG_RENDERER_HPP