fix visibility of mapnik::composite function to python bindings - refs #2587

This commit is contained in:
Dane Springmeyer 2014-12-03 00:43:04 -05:00
parent 46215c0f35
commit 1ff4125e92
2 changed files with 7 additions and 28 deletions

View file

@ -82,29 +82,18 @@ enum composite_mode_e
MAPNIK_DECL boost::optional<composite_mode_e> comp_op_from_string(std::string const& name); MAPNIK_DECL boost::optional<composite_mode_e> comp_op_from_string(std::string const& name);
MAPNIK_DECL boost::optional<std::string> comp_op_to_string(composite_mode_e comp_op); MAPNIK_DECL boost::optional<std::string> comp_op_to_string(composite_mode_e comp_op);
template <typename T1, typename T2> MAPNIK_DECL void composite(image_data_32 & dst, image_data_32 & src,
MAPNIK_DECL void composite(T1 & dst, T2 & src,
composite_mode_e mode, composite_mode_e mode,
float opacity=1, float opacity=1,
int dx=0, int dx=0,
int dy=0, int dy=0,
bool premultiply_src=false); bool premultiply_src=false);
//extern template MAPNIK_DECL void composite<mapnik::image_data_32,mapnik::image_data_32>(mapnik::image_data_32 & dst, MAPNIK_DECL void composite(image_data_float32 & dst, image_data_float32 & src,
// mapnik::image_data_32 & src, composite_mode_e mode,
// composite_mode_e mode, float opacity=1,
// float opacity, int dx=0,
// int dx, int dy=0,
// int dy, bool premultiply_src=false);
// bool premultiply_src);
//extern template MAPNIK_DECL void composite<mapnik::image_data_float32,mapnik::image_data_float32>(mapnik::image_data_float32 & dst,
// mapnik::image_data_float32 & src,
// composite_mode_e mode,
// float opacity,
// int dx,
// int dy,
// bool premultiply_src);
} }
#endif // MAPNIK_IMAGE_COMPOSITING_HPP #endif // MAPNIK_IMAGE_COMPOSITING_HPP

View file

@ -123,7 +123,6 @@ For example, if you generate some pattern with AGG (premultiplied) and would lik
*/ */
template <>
void composite(mapnik::image_data_32 & dst, mapnik::image_data_32 & src, composite_mode_e mode, void composite(mapnik::image_data_32 & dst, mapnik::image_data_32 & src, composite_mode_e mode,
float opacity, float opacity,
int dx, int dx,
@ -148,7 +147,6 @@ void composite(mapnik::image_data_32 & dst, mapnik::image_data_32 & src, composi
ren.blend_from(pixf_mask,0,dx,dy,unsigned(255*opacity)); ren.blend_from(pixf_mask,0,dx,dy,unsigned(255*opacity));
} }
template <>
void composite(mapnik::image_data_float32 & dst, mapnik::image_data_float32 & src, composite_mode_e mode, void composite(mapnik::image_data_float32 & dst, mapnik::image_data_float32 & src, composite_mode_e mode,
float opacity, float opacity,
int dx, int dx,
@ -174,12 +172,4 @@ void composite(mapnik::image_data_float32 & dst, mapnik::image_data_float32 & sr
ren.copy_from(pixf_mask,0,dx,dy);//unsigned(255*opacity)); ren.copy_from(pixf_mask,0,dx,dy);//unsigned(255*opacity));
} }
template void composite<mapnik::image_data_32,mapnik::image_data_32>(mapnik::image_data_32&,
mapnik::image_data_32&,
composite_mode_e,
float,
int,
int,
bool);
} }