示例#1
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
     auto const& feat = boost::fusion::at_c<6>(args);
     auto const& vars = boost::fusion::at_c<7>(args);
     geom.set_simplify_algorithm(static_cast<simplify_algorithm_e>(get<value_integer>(sym, keys::simplify_algorithm, feat, vars)));
     geom.set_simplify_tolerance(get<value_double>(sym, keys::simplify_tolerance, feat, vars));
 }
示例#2
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
     stroke const& stroke_ = sym.get_stroke();
     set_join_caps(stroke_,geom);
     geom.generator().miter_limit(stroke_.get_miterlimit());
     double scale_factor = boost::fusion::at_c<6>(args);
     geom.generator().width(stroke_.get_width() * scale_factor);
 }
示例#3
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
     auto const& feat = boost::fusion::at_c<6>(args);
     auto const& vars = boost::fusion::at_c<7>(args);
     set_join_caps(sym, geom, feat, vars);
     double miterlimit = get<value_double>(sym, keys::stroke_miterlimit, feat, vars, 4.0);
     geom.generator().miter_limit(miterlimit);
     double scale_factor = boost::fusion::at_c<8>(args);
     double width = get<value_double>(sym, keys::stroke_width, feat, vars, 1.0);
     geom.generator().width(width * scale_factor);
 }
示例#4
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
     auto const& feat = boost::fusion::at_c<6>(args);
     auto const& vars = boost::fusion::at_c<7>(args);
     geom.smooth_value(get<value_double>(sym, keys::smooth, feat, vars));
 }
示例#5
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
     auto const& feat = boost::fusion::at_c<6>(args);
     auto const& vars = boost::fusion::at_c<7>(args);
     double offset = get<value_double>(sym, keys::offset, feat, vars);
     double scale_factor = boost::fusion::at_c<8>(args);
     geom.set_offset(offset * scale_factor);
 }
示例#6
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
     double scale_factor = boost::fusion::at_c<8>(args);
     auto dash = get_optional<dash_array>(sym, keys::stroke_dasharray);
     if (dash)
     {
         for (auto const& d : *dash)
         {
             geom.add_dash(d.first * scale_factor,
                           d.second * scale_factor);
         }
     }
 }
示例#7
0
    static void setup(geometry_type & geom, Args const& args)
    {
        typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
        double scale_factor = boost::fusion::at_c<6>(args);
        stroke const& stroke_ = sym.get_stroke();
        dash_array const& d = stroke_.get_dash_array();
        dash_array::const_iterator itr = d.begin();
        dash_array::const_iterator end = d.end();
        for (;itr != end;++itr)
        {
            geom.add_dash(itr->first * scale_factor,
                          itr->second * scale_factor);
        }

    }
示例#8
0
 static void setup(geometry_type & geom, Args & args)
 {
     geom.transformer(boost::fusion::at_c<5>(args));
 }
示例#9
0
 static void setup(geometry_type & geom, Args const& args)
 {
     geom.set_proj_trans(boost::fusion::at_c<4>(args));
     geom.set_trans(boost::fusion::at_c<3>(args));
 }
示例#10
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<0> >::type box = boost::fusion::at_c<0>(args);
     geom.clip_box(box.minx(),box.miny(),box.maxx(),box.maxy());
     //geom.set_clip_box(box);
 }
示例#11
0
 static void setup(geometry_type & geom, Args const& args)
 {
     geom.smooth_value(boost::fusion::at_c<2>(args).smooth());
 }
示例#12
0
 static void setup(geometry_type & geom, Args const& args)
 {
     typename boost::mpl::at<Args,boost::mpl::int_<2> >::type sym = boost::fusion::at_c<2>(args);
     double scale_factor = boost::fusion::at_c<6>(args);
     geom.set_offset(sym.offset()*scale_factor);
 }
示例#13
0
 static void setup(geometry_type & geom, Args const& args)
 {
     geom.set_simplify_algorithm(boost::fusion::at_c<2>(args).simplify_algorithm());
     geom.set_simplify_tolerance(boost::fusion::at_c<2>(args).simplify_tolerance());
 }