GunChleoc has proposed merging 
lp:~widelands-dev/widelands/draw_rect_missing_pixel into lp:widelands.

Commit message:
Added missing pixel on the bottom right corner in the draw_rect program.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/draw_rect_missing_pixel/+merge/290141

Visible in soldier health bars, minimap preview while loading game, checkbox, 
and progressbar.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/draw_rect_missing_pixel into lp:widelands.
=== modified file 'src/graphic/surface.cc'
--- src/graphic/surface.cc	2016-03-08 09:38:16 +0000
+++ src/graphic/surface.cc	2016-03-25 18:48:57 +0000
@@ -176,6 +176,7 @@
 	const FloatPoint bottom_right = FloatPoint(rc.x + rc.w - 0.5f, rc.y + rc.h - 0.5f);
 	const FloatPoint bottom_left = FloatPoint(rc.x + 0.5f, rc.y + rc.h - 0.5f);
 
-	surface->draw_line_strip(
-		{top_left, top_right, bottom_right, bottom_left, top_left}, clr, 1);
+	surface->draw_line_strip({top_left, top_right, bottom_right}, clr, 1);
+	// We need to split this up in order not to miss a pixel on the bottom right corner.
+	surface->draw_line_strip({FloatPoint(bottom_right.x + 1, bottom_right.y), bottom_left, top_left}, clr, 1);
 }

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to