Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_gdirender.c @ 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 |
comparison
equal
deleted
inserted
replaced
3534:9d129e1d0782 | 3535:b403f790df65 |
---|---|
741 points[1].x = x2; | 741 points[1].x = x2; |
742 points[1].y = y2; | 742 points[1].y = y2; |
743 status = Polyline(data->current_hdc, points, 2); | 743 status = Polyline(data->current_hdc, points, 2); |
744 DeleteObject(pen); | 744 DeleteObject(pen); |
745 | 745 |
746 /* Need to close the endpoint of the line */ | |
747 SetPixel(data->current_hdc, x2, y2, | |
748 RGB(renderer->r, renderer->g, renderer->b)); | |
749 | |
746 if (!status) { | 750 if (!status) { |
747 WIN_SetError("FillRect()"); | 751 WIN_SetError("FillRect()"); |
748 return -1; | 752 return -1; |
749 } | 753 } |
750 return 0; | 754 return 0; |
762 SDL_AddDirtyRect(&data->dirty, rect); | 766 SDL_AddDirtyRect(&data->dirty, rect); |
763 } | 767 } |
764 | 768 |
765 rc.left = rect->x; | 769 rc.left = rect->x; |
766 rc.top = rect->y; | 770 rc.top = rect->y; |
767 rc.right = rect->x + rect->w + 1; | 771 rc.right = rect->x + rect->w; |
768 rc.bottom = rect->y + rect->h + 1; | 772 rc.bottom = rect->y + rect->h; |
769 | 773 |
770 /* Should we cache the brushes? .. it looks like GDI does for us. :) */ | 774 /* Should we cache the brushes? .. it looks like GDI does for us. :) */ |
771 brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b)); | 775 brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b)); |
772 SelectObject(data->current_hdc, brush); | 776 SelectObject(data->current_hdc, brush); |
773 status = FillRect(data->current_hdc, &rc, brush); | 777 status = FillRect(data->current_hdc, &rc, brush); |