added write access to alpha property.
This commit is contained in:
parent
8a72060fad
commit
02d95a7ba2
1 changed files with 5 additions and 5 deletions
|
@ -32,7 +32,7 @@ using mapnik::color_factory;
|
|||
struct color_pickle_suite : boost::python::pickle_suite
|
||||
{
|
||||
static boost::python::tuple
|
||||
getinitargs(const Color& c)
|
||||
getinitargs(const Color& c)
|
||||
{
|
||||
using namespace boost::python;
|
||||
return boost::python::make_tuple(c.red(),c.green(),c.blue());
|
||||
|
@ -61,11 +61,11 @@ void export_color ()
|
|||
.add_property("r",&Color::red,&Color::set_red)
|
||||
.add_property("g",&Color::green,&Color::set_green)
|
||||
.add_property("b",&Color::blue,&Color::set_blue)
|
||||
.add_property("a",&Color::alpha)
|
||||
.def(self == self)
|
||||
.add_property("a",&Color::alpha,&Color::set_alpha)
|
||||
.def(self == self)
|
||||
.def_pickle(color_pickle_suite())
|
||||
.def("__str__",&Color::to_string)
|
||||
;
|
||||
.def("__str__",&Color::to_string)
|
||||
;
|
||||
|
||||
def("Color",&create_from_string);
|
||||
def("Color",&create_from_rgba);
|
||||
|
|
Loading…
Add table
Reference in a new issue