Changeset - r21368:28b548873115
[Not reviewed]
master
0 1 0
peter1138 - 10 years ago 2014-04-16 19:54:51
peter1138@openttd.org
(svn r26467) -Fix: Include shadow on ...
1 file changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -418,19 +418,21 @@ static int DrawLayoutLine(const Paragrap
 
			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 Paragrap
 
	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);
 
		}
 
	}
0 comments (0 inline, 0 general)