Merge commit '631923e675b486583dbded735b7df4dca6b7cd0b' into hb-test2

Conflicts:
	src/font_engine_freetype.cpp
This commit is contained in:
Hermann Kraus 2013-03-20 17:15:02 +01:00
commit f992927cd3
3 changed files with 10 additions and 7 deletions

View file

@ -63,7 +63,9 @@ public:
void render(glyph_positions_ptr pos);
private:
pixmap_type & pixmap_;
void render_halo(FT_Bitmap *bitmap, unsigned rgba, int x, int y, int halo_radius, double opacity);
void render_halo(FT_Bitmap *bitmap, unsigned rgba, int x, int y,
int halo_radius, double opacity,
composite_mode_e comp_op);
};
template <typename T>

View file

@ -21,8 +21,8 @@
*****************************************************************************/
// mapnik
#include <mapnik/font_engine_freetype.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/font_engine_freetype.hpp>
// boost
#include <boost/algorithm/string.hpp>

View file

@ -145,7 +145,8 @@ void agg_text_renderer<T>::render(glyph_positions_ptr pos)
bit->left,
height - bit->top,
halo_radius,
format->text_opacity);
format->text_opacity,
comp_op_);
}
}
}
@ -220,13 +221,13 @@ void grid_text_renderer<T>::render(glyph_positions_ptr pos, value_integer featur
template <typename T>
void agg_text_renderer<T>::render_halo(
FT_Bitmap *bitmap,
void agg_text_renderer<T>::render_halo(FT_Bitmap *bitmap,
unsigned rgba,
int x,
int y,
int halo_radius,
double opacity)
double opacity,
composite_mode_e comp_op)
{
int x_max=x+bitmap->width;
int y_max=y+bitmap->rows;
@ -241,7 +242,7 @@ void agg_text_renderer<T>::render_halo(
{
for (int n=-halo_radius; n <=halo_radius; ++n)
for (int m=-halo_radius;m <= halo_radius; ++m)
pixmap_.blendPixel2(i+m,j+n,rgba,gray,opacity);
pixmap_.composite_pixel(comp_op, i+m, j+n, rgba, gray, opacity);
}
}
}