From e943d355e2debb357ef43f15539f038c308e51ae Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 16 Apr 2014 19:54:51 +0000 Subject: (svn r26467) -Fix: Include shadow on ... --- src/gfx.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/gfx.cpp') diff --git a/src/gfx.cpp b/src/gfx.cpp index 40cea78c0..adc644d20 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -418,19 +418,21 @@ static int DrawLayoutLine(const ParagraphLayouter::Line *line, int y, int left, NOT_REACHED(); } + TextColour colour = TC_BLACK; + bool draw_shadow = false; for (int run_index = 0; run_index < line->CountRuns(); run_index++) { const ParagraphLayouter::VisualRun *run = line->GetVisualRun(run_index); const Font *f = (const Font*)run->GetFont(); FontCache *fc = f->fc; - TextColour colour = f->colour; + colour = f->colour; SetColourRemap(colour); DrawPixelInfo *dpi = _cur_dpi; int dpi_left = dpi->left; int dpi_right = dpi->left + dpi->width - 1; - bool draw_shadow = fc->GetDrawGlyphShadow() && colour != TC_BLACK; + draw_shadow = fc->GetDrawGlyphShadow() && colour != TC_BLACK; for (int i = 0; i < run->GetGlyphCount(); i++) { GlyphID glyph = run->GetGlyphs()[i]; @@ -461,6 +463,11 @@ static int DrawLayoutLine(const ParagraphLayouter::Line *line, int y, int left, if (truncation) { int x = (_current_text_dir == TD_RTL) ? left : (right - 3 * dot_width); for (int i = 0; i < 3; i++, x += dot_width) { + if (draw_shadow) { + SetColourRemap(TC_BLACK); + GfxMainBlitter(dot_sprite, x + 1, y + 1, BM_COLOUR_REMAP); + SetColourRemap(colour); + } GfxMainBlitter(dot_sprite, x, y, BM_COLOUR_REMAP); } } -- cgit v1.2.3-54-g00ecf