Add FormatingFormatNode properties.

This commit is contained in:
Hermann Kraus 2012-02-08 20:39:09 +01:00
parent 03e9cac7f6
commit c28582a23c
2 changed files with 19 additions and 3 deletions

View file

@ -636,9 +636,14 @@ BOOST_PYTHON_MODULE(_mapnik)
def("has_cairo", &has_cairo, "Get cairo library status");
def("has_pycairo", &has_pycairo, "Get pycairo module status");
python_optional<mapnik::color> ();
python_optional<mapnik::box2d<double> > ();
python_optional<mapnik::datasource::geometry_t> ();
python_optional<mapnik::color>();
python_optional<mapnik::box2d<double> >();
python_optional<mapnik::datasource::geometry_t>();
python_optional<std::string>();
python_optional<unsigned>();
python_optional<double>();
python_optional<bool>();
python_optional<mapnik::text_transform_e>();
register_ptr_to_python<mapnik::expression_ptr>();
register_ptr_to_python<mapnik::path_expression_ptr>();
to_python_converter<mapnik::value_holder,mapnik_param_to_python>();

View file

@ -399,6 +399,17 @@ void export_text_placement()
.add_property("child",
&formating::format_node::get_child,
&formating::format_node::set_child)
.def_readwrite("face_name", &formating::format_node::face_name)
.def_readwrite("text_size", &formating::format_node::text_size)
.def_readwrite("character_spacing", &formating::format_node::character_spacing)
.def_readwrite("line_spacing", &formating::format_node::line_spacing)
.def_readwrite("text_opacity", &formating::format_node::text_opacity)
.def_readwrite("wrap_char", &formating::format_node::wrap_char)
.def_readwrite("wrap_before", &formating::format_node::wrap_before)
.def_readwrite("text_transform", &formating::format_node::text_transform)
.def_readwrite("fill", &formating::format_node::fill)
.def_readwrite("halo_fill", &formating::format_node::halo_fill)
.def_readwrite("halo_radius", &formating::format_node::halo_radius)
;
register_ptr_to_python<boost::shared_ptr<formating::format_node> >();
}