Merge branch 'release/image_data_any' of github.com:mapnik/mapnik into release/image_data_any

This commit is contained in:
Blake Thompson 2015-02-18 23:02:34 -06:00
commit 744dc4472f
2 changed files with 7 additions and 36 deletions

View file

@ -202,7 +202,7 @@ MAPNIK_DECL void set_rectangle (T & dst, T const& src, int x = 0, int y = 0);
// CHECK BOUNDS
template <typename T>
MAPNIK_DECL bool check_bounds (T const& data, std::size_t x, std::size_t y)
inline bool check_bounds (T const& data, std::size_t x, std::size_t y)
{
return (x < static_cast<int>(data.width()) && y < static_cast<int>(data.height()));
}
@ -409,35 +409,6 @@ void add_border(T & image)
}
}
#ifdef _MSC_VER
template MAPNIK_DECL void save_to_stream<image_rgba8>(
image_rgba8 const& image,
std::ostream & stream,
std::string const& type,
rgba_palette const& palette
);
template MAPNIK_DECL void save_to_stream<image_rgba8>(
image_rgba8 const& image,
std::ostream & stream,
std::string const& type
);
template MAPNIK_DECL void save_to_stream<image_view_rgba8> (
image_view_rgba8 const& image,
std::ostream & stream,
std::string const& type,
rgba_palette const& palette
);
template MAPNIK_DECL void save_to_stream<image_view_rgba8> (
image_view_rgba8 const& image,
std::ostream & stream,
std::string const& type
);
#endif
}
#endif // MAPNIK_IMAGE_UTIL_HPP

View file

@ -613,7 +613,7 @@ struct visitor_set_alpha
void operator() (image_rgba8 & data)
{
using pixel_type = typename image_rgba8::pixel_type;
using pixel_type = image_rgba8::pixel_type;
for (unsigned int y = 0; y < data.height(); ++y)
{
pixel_type* row_to = data.getRow(y);
@ -689,7 +689,7 @@ struct visitor_set_grayscale_to_alpha
{
void operator() (image_rgba8 & data)
{
using pixel_type = typename image_rgba8::pixel_type;
using pixel_type = image_rgba8::pixel_type;
for (unsigned int y = 0; y < data.height(); ++y)
{
pixel_type* row_from = data.getRow(y);
@ -722,7 +722,7 @@ struct visitor_set_grayscale_to_alpha_c
void operator() (image_rgba8 & data)
{
using pixel_type = typename image_rgba8::pixel_type;
using pixel_type = image_rgba8::pixel_type;
for (unsigned int y = 0; y < data.height(); ++y)
{
pixel_type* row_from = data.getRow(y);
@ -834,7 +834,7 @@ struct visitor_set_color_to_alpha
void operator() (image_rgba8 & data)
{
using pixel_type = typename image_rgba8::pixel_type;
using pixel_type = image_rgba8::pixel_type;
for (unsigned y = 0; y < data.height(); ++y)
{
pixel_type* row_from = data.getRow(y);
@ -942,7 +942,7 @@ struct visitor_fill<color>
void operator() (image_rgba8 & data)
{
using pixel_type = typename image_rgba8::pixel_type;
using pixel_type = image_rgba8::pixel_type;
pixel_type val = static_cast<pixel_type>(val_.rgba());
data.set(val);
data.set_premultiplied(val_.get_premultiplied());
@ -1198,7 +1198,7 @@ struct visitor_set_rectangle
void operator()(image_rgba8 & dst)
{
using pixel_type = typename image_rgba8::pixel_type;
using pixel_type = image_rgba8::pixel_type;
image_rgba8 src = util::get<image_rgba8>(src_);
box2d<int> ext0(0,0,dst.width(),dst.height());
box2d<int> ext1(x0_,y0_,x0_+src.width(),y0_+src.height());