+ int stride = Cairo::ImageSurface::format_stride_for_width (_format, _width);
+ if (allocate_data) {
+ boost::shared_ptr<Data> d (new Data (new uint8_t[stride*_height], _width, _height, stride, _format));
+ return d;
+ } else {
+ boost::shared_ptr<Data> d (new Data (NULL, _width, _height, stride, _format));
+ return d;
+ }