Merge commit '631923e675b486583dbded735b7df4dca6b7cd0b' into hb-test2
Conflicts: src/font_engine_freetype.cpp
This commit is contained in:
commit
f992927cd3
3 changed files with 10 additions and 7 deletions
|
@ -63,7 +63,9 @@ public:
|
||||||
void render(glyph_positions_ptr pos);
|
void render(glyph_positions_ptr pos);
|
||||||
private:
|
private:
|
||||||
pixmap_type & pixmap_;
|
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>
|
template <typename T>
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// mapnik
|
// mapnik
|
||||||
#include <mapnik/font_engine_freetype.hpp>
|
|
||||||
#include <mapnik/debug.hpp>
|
#include <mapnik/debug.hpp>
|
||||||
|
#include <mapnik/font_engine_freetype.hpp>
|
||||||
|
|
||||||
// boost
|
// boost
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
|
@ -145,7 +145,8 @@ void agg_text_renderer<T>::render(glyph_positions_ptr pos)
|
||||||
bit->left,
|
bit->left,
|
||||||
height - bit->top,
|
height - bit->top,
|
||||||
halo_radius,
|
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>
|
template <typename T>
|
||||||
void agg_text_renderer<T>::render_halo(
|
void agg_text_renderer<T>::render_halo(FT_Bitmap *bitmap,
|
||||||
FT_Bitmap *bitmap,
|
|
||||||
unsigned rgba,
|
unsigned rgba,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int halo_radius,
|
int halo_radius,
|
||||||
double opacity)
|
double opacity,
|
||||||
|
composite_mode_e comp_op)
|
||||||
{
|
{
|
||||||
int x_max=x+bitmap->width;
|
int x_max=x+bitmap->width;
|
||||||
int y_max=y+bitmap->rows;
|
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 n=-halo_radius; n <=halo_radius; ++n)
|
||||||
for (int m=-halo_radius;m <= halo_radius; ++m)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue