Hey, those automated tests are coming in handy! Fixed GDI rendering semantics
authorSam Lantinga
Mon, 07 Dec 2009 10:08:24 +0000
changeset 3535b403f790df65
parent 3534 9d129e1d0782
child 3536 0267b8b1595c
Hey, those automated tests are coming in handy! Fixed GDI rendering semantics
src/video/win32/SDL_gdirender.c
     1.1 --- a/src/video/win32/SDL_gdirender.c	Mon Dec 07 09:44:55 2009 +0000
     1.2 +++ b/src/video/win32/SDL_gdirender.c	Mon Dec 07 10:08:24 2009 +0000
     1.3 @@ -743,6 +743,10 @@
     1.4      status = Polyline(data->current_hdc, points, 2);
     1.5      DeleteObject(pen);
     1.6  
     1.7 +    /* Need to close the endpoint of the line */
     1.8 +    SetPixel(data->current_hdc, x2, y2,
     1.9 +             RGB(renderer->r, renderer->g, renderer->b));
    1.10 +
    1.11      if (!status) {
    1.12          WIN_SetError("FillRect()");
    1.13          return -1;
    1.14 @@ -764,8 +768,8 @@
    1.15  
    1.16      rc.left = rect->x;
    1.17      rc.top = rect->y;
    1.18 -    rc.right = rect->x + rect->w + 1;
    1.19 -    rc.bottom = rect->y + rect->h + 1;
    1.20 +    rc.right = rect->x + rect->w;
    1.21 +    rc.bottom = rect->y + rect->h;
    1.22  
    1.23      /* Should we cache the brushes? .. it looks like GDI does for us. :) */
    1.24      brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b));