changeset 3535:b403f790df65

Hey, those automated tests are coming in handy! Fixed GDI rendering semantics
author Sam Lantinga <slouken@libsdl.org>
date Mon, 07 Dec 2009 10:08:24 +0000
parents 9d129e1d0782
children 0267b8b1595c
files src/video/win32/SDL_gdirender.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/win32/SDL_gdirender.c	Mon Dec 07 09:44:55 2009 +0000
+++ b/src/video/win32/SDL_gdirender.c	Mon Dec 07 10:08:24 2009 +0000
@@ -743,6 +743,10 @@
     status = Polyline(data->current_hdc, points, 2);
     DeleteObject(pen);
 
+    /* Need to close the endpoint of the line */
+    SetPixel(data->current_hdc, x2, y2,
+             RGB(renderer->r, renderer->g, renderer->b));
+
     if (!status) {
         WIN_SetError("FillRect()");
         return -1;
@@ -764,8 +768,8 @@
 
     rc.left = rect->x;
     rc.top = rect->y;
-    rc.right = rect->x + rect->w + 1;
-    rc.bottom = rect->y + rect->h + 1;
+    rc.right = rect->x + rect->w;
+    rc.bottom = rect->y + rect->h;
 
     /* Should we cache the brushes? .. it looks like GDI does for us. :) */
     brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b));