@@ -95,11 +95,12 @@ void moduleAddVisualParams(py::module &m)
9595 dt.def (" drawText" , [](DrawTool* self, int x, int y, int fontSize, char * text){
9696 self->writeOverlayText (x,y, fontSize, sofa::type::RGBAColor::white (), text);
9797 });
98- dt.def (" drawRGBAImage" , [](DrawTool* self, const std::string& id, const sofa::type::Vec3& pos, const int w, const int h, const int mode, const char * data){
99- self->drawRGBAImage (id, pos, w, h, mode, data);
98+ dt.def (" drawRGBAImage" , [](DrawTool* self, const std::string& id, const int revision, const sofa::type::Vec3& pos, const double scale, const int w, const int h, const int mode, py::array_t <char , py::array::c_style | py::array::forcecast> data){
99+ char * buffer = static_cast <char *>(data.request ().ptr );
100+ self->drawRGBAImage (id, revision, pos, scale, w, h, mode, buffer);
100101 });
101- dt.def (" drawRGBAImage" , [](DrawTool* self, const std::string& id, const sofa::type::Vec3& pos, const std::string& filename){
102- self->drawRGBAImage (id, pos, filename);
102+ dt.def (" drawRGBAImage" , [](DrawTool* self, const std::string& id, const int revision, const sofa::type::Vec3& pos, const double scale , const std::string& filename){
103+ self->drawRGBAImage (id, revision, pos, scale , filename);
103104 });
104105
105106}
0 commit comments