Permalink
Browse files

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

  • Loading branch information...
1 parent bfdd9dc commit 2e737e07b2f751a150b9c7f6cba72ff78cf60355 Dane Springmeyer committed Oct 3, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 include/mapnik/raster.hpp
@@ -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)
{}
+
};
}

0 comments on commit 2e737e0

Please sign in to comment.