コード例 #1
0
ファイル: symbolizer_helpers.cpp プロジェクト: x0b1t/mapnik
text_symbolizer_helper<FaceManagerT, DetectorT>::text_symbolizer_helper(text_symbolizer const& sym,
                           feature_impl const& feature,
                           proj_transform const& prj_trans,
                           unsigned width,
                           unsigned height,
                           double scale_factor,
                           CoordTransform const& t,
                           FaceManagerT &font_manager,
                           DetectorT &detector,
                           box2d<double> const& query_extent)
        : sym_(sym),
          feature_(feature),
          prj_trans_(prj_trans),
          t_(t),
          font_manager_(font_manager),
          detector_(detector),
          dims_(0, 0, width, height),
          query_extent_(query_extent),
          text_(font_manager, scale_factor),
          angle_(0.0),
          placement_valid_(false),
          points_on_line_(false),
          finder_(0)
    {
        initialize_geometries();
        if (!geometries_to_process_.size()) return;
        placement_ = sym_.get_placement_options()->get_placement_info(scale_factor);
        next_placement();
        initialize_points();
    }
コード例 #2
0
ファイル: symbolizer_helpers.cpp プロジェクト: plepe/mapnik
base_symbolizer_helper::base_symbolizer_helper(
        symbolizer_base const& sym,
        feature_impl const& feature,
        attributes const& vars,
        proj_transform const& prj_trans,
        unsigned width, unsigned height, double scale_factor,
        CoordTransform const& t,
        box2d<double> const& query_extent)
    : sym_(sym),
      feature_(feature),
      vars_(vars),
      prj_trans_(prj_trans),
      t_(t),
      dims_(0, 0, width, height),
      query_extent_(query_extent),
      scale_factor_(scale_factor),
      clipped_(get<bool>(sym_, keys::clip, feature_, vars_, false)),
      placement_(get<text_placements_ptr>(sym_, keys::text_placements_)->get_placement_info(scale_factor))
{
    initialize_geometries();
    if (!geometries_to_process_.size()) return; // FIXME - bad practise
    initialize_points();
}
コード例 #3
0
ファイル: symbolizer_helpers.cpp プロジェクト: evizbiz/mapnik
base_symbolizer_helper::base_symbolizer_helper(
        symbolizer_base const& sym,
        feature_impl const& feature,
        attributes const& vars,
        proj_transform const& prj_trans,
        unsigned width, unsigned height, double scale_factor,
        view_transform const& t,
        box2d<double> const& query_extent)
    : sym_(sym),
      feature_(feature),
      vars_(vars),
      prj_trans_(prj_trans),
      t_(t),
      dims_(0, 0, width, height),
      query_extent_(query_extent),
      scale_factor_(scale_factor),
      info_ptr_(mapnik::get<text_placements_ptr>(sym_, keys::text_placements_)->get_placement_info(scale_factor,feature_,vars_)),
      text_props_(evaluate_text_properties(info_ptr_->properties,feature_,vars_))
{
    initialize_geometries();
    if (!geometries_to_process_.size()) return; // FIXME - bad practise
    initialize_points();
}