alternative mapnik::raster constructor that allows less copying - refs #1508
This commit is contained in:
parent
bfdd9dcb00
commit
2e737e07b2
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
{}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue