alternative mapnik::raster constructor that allows less copying - refs #1508

This commit is contained in:
Dane Springmeyer 2012-10-02 21:46:31 -07:00
parent bfdd9dcb00
commit 2e737e07b2

View file

@ -33,11 +33,17 @@ struct raster
box2d<double> ext_;
image_data_32 data_;
bool premultiplied_alpha_;
raster(box2d<double> const& ext, unsigned width, unsigned height, bool premultiplied_alpha = false)
: ext_(ext),
data_(width,height),
premultiplied_alpha_(premultiplied_alpha)
{}
raster(box2d<double> const& ext,image_data_32 const& data, bool premultiplied_alpha = false)
: ext_(ext),
data_(data),
premultiplied_alpha_(premultiplied_alpha)
{}
};
}