changeset 3056:a434fe6360df

Oh, Polyline() uses a pen, not a brush. Doh! :)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 08 Feb 2009 15:35:06 +0000
parents cd863dd2082b
children 089a77aebb7d
files src/video/win32/SDL_gdirender.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/win32/SDL_gdirender.c	Sat Feb 07 18:03:46 2009 +0000
+++ b/src/video/win32/SDL_gdirender.c	Sun Feb 08 15:35:06 2009 +0000
@@ -673,7 +673,7 @@
 {
     GDI_RenderData *data = (GDI_RenderData *) renderer->driverdata;
     POINT points[2];
-    HBRUSH brush;
+    HPEN pen;
     BOOL status;
 
     if (data->makedirty) {
@@ -696,15 +696,15 @@
         SDL_AddDirtyRect(&data->dirty, &rect);
     }
 
-    /* Should we cache the brushes? .. it looks like GDI does for us. :) */
-    brush = CreateSolidBrush(RGB(renderer->r, renderer->g, renderer->b));
-    SelectObject(data->current_hdc, brush);
+    /* Should we cache the pen? .. it looks like GDI does for us. :) */
+    pen = CreatePen(PS_SOLID, 1, RGB(renderer->r, renderer->g, renderer->b));
+    SelectObject(data->current_hdc, pen);
     points[0].x = x1;
     points[0].y = y1;
     points[1].x = x2;
     points[1].y = y2;
     status = Polyline(data->current_hdc, points, 2);
-    DeleteObject(brush);
+    DeleteObject(pen);
 
     if (!status) {
         WIN_SetError("FillRect()");