+add pickle support to line_symbolizer - see #345
This commit is contained in:
parent
def1c709ce
commit
e7e0dd9045
1 changed files with 11 additions and 0 deletions
|
@ -28,6 +28,16 @@ using mapnik::line_symbolizer;
|
|||
using mapnik::stroke;
|
||||
using mapnik::color;
|
||||
|
||||
struct line_symbolizer_pickle_suite : boost::python::pickle_suite
|
||||
{
|
||||
static boost::python::tuple
|
||||
getinitargs(const line_symbolizer& l)
|
||||
{
|
||||
return boost::python::make_tuple(l.get_stroke());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void export_line_symbolizer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
@ -36,6 +46,7 @@ void export_line_symbolizer()
|
|||
init<>("Default LineSymbolizer - 1px solid black"))
|
||||
.def(init<stroke const&>("TODO"))
|
||||
.def(init<color const& ,float>())
|
||||
.def_pickle(line_symbolizer_pickle_suite())
|
||||
.add_property("stroke",make_function
|
||||
(&line_symbolizer::get_stroke,
|
||||
return_value_policy<copy_const_reference>()),
|
||||
|
|
Loading…
Add table
Reference in a new issue