expose both a clipped and unclipped labeling path type

This commit is contained in:
Dane Springmeyer 2012-03-22 16:36:25 -07:00
parent 61c38d0ec7
commit d23a4b63b9
2 changed files with 20 additions and 11 deletions

View file

@ -28,6 +28,13 @@
#include <mapnik/text_properties.hpp> #include <mapnik/text_properties.hpp>
#include <mapnik/text_placements/base.hpp> #include <mapnik/text_placements/base.hpp>
#include <mapnik/symbolizer_helpers.hpp> #include <mapnik/symbolizer_helpers.hpp>
#include <mapnik/label_collision_detector.hpp>
#include <mapnik/ctrans.hpp>
// agg
#include "agg_conv_clip_polyline.h"
// stl // stl
#include <queue> #include <queue>
@ -39,6 +46,12 @@ class text_placement_info;
class string_info; class string_info;
class text_path; class text_path;
typedef agg::conv_clip_polyline<geometry_type> clipped_geometry_type;
typedef coord_transform2<CoordTransform,clipped_geometry_type> ClippedPathType;
typedef coord_transform2<CoordTransform,geometry_type> PathType;
typedef label_collision_detector4 DetectorType;
template <typename DetectorT> template <typename DetectorT>
class placement_finder : boost::noncopyable class placement_finder : boost::noncopyable

View file

@ -26,14 +26,12 @@
#include <mapnik/placement_finder.hpp> #include <mapnik/placement_finder.hpp>
#include <mapnik/geometry.hpp> #include <mapnik/geometry.hpp>
#include <mapnik/text_path.hpp> #include <mapnik/text_path.hpp>
#include <mapnik/label_collision_detector.hpp>
#include <mapnik/fastmath.hpp> #include <mapnik/fastmath.hpp>
#include <mapnik/text_placements/base.hpp> #include <mapnik/text_placements/base.hpp>
#include <mapnik/ctrans.hpp>
// agg // agg
#include "agg_path_length.h" #include "agg_path_length.h"
#include "agg_conv_clip_polyline.h"
// boost // boost
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/utility.hpp> #include <boost/utility.hpp>
@ -1058,11 +1056,9 @@ void placement_finder<DetectorT>::clear_placements()
while (!envelopes_.empty()) envelopes_.pop(); while (!envelopes_.empty()) envelopes_.pop();
} }
typedef agg::conv_clip_polyline<geometry_type> clipped_geometry_type;
typedef coord_transform2<CoordTransform,clipped_geometry_type> PathType;
typedef label_collision_detector4 DetectorType;
template class placement_finder<DetectorType>; template class placement_finder<DetectorType>;
template void placement_finder<DetectorType>::find_point_placements<ClippedPathType>(ClippedPathType &);
template void placement_finder<DetectorType>::find_line_placements<ClippedPathType>(ClippedPathType &);
template void placement_finder<DetectorType>::find_point_placements<PathType>(PathType &); template void placement_finder<DetectorType>::find_point_placements<PathType>(PathType &);
template void placement_finder<DetectorType>::find_line_placements<PathType>(PathType &); template void placement_finder<DetectorType>::find_line_placements<PathType>(PathType &);
} // namespace } // namespace