From 7c77354f8308981d63a6a467d1af8da11065513a Mon Sep 17 00:00:00 2001 From: Huw D M Davies Date: Fri, 18 Dec 1998 15:55:15 +0000 Subject: [PATCH] Implemented PolylineTo. --- graphics/painting.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/graphics/painting.c b/graphics/painting.c index 363e2fa766e..423853fc50b 100644 --- a/graphics/painting.c +++ b/graphics/painting.c @@ -729,8 +729,24 @@ BOOL32 WINAPI Polyline32( HDC32 hdc, const POINT32* pt, INT32 count ) */ BOOL32 WINAPI PolylineTo32( HDC32 hdc, const POINT32* pt, DWORD cCount ) { - FIXME(gdi,"PolylineTo, stub\n"); - return 0; + POINT32 *pts = HeapAlloc( GetProcessHeap(), 0, + sizeof(POINT32) * (cCount + 1) ); + if(!pts) return FALSE; + + /* Get the current point */ + MoveToEx32( hdc, 0, 0, pts); + + /* Add in the other points */ + memcpy( pts + 1, pt, sizeof(POINT32) * cCount ); + + /* Draw the lines */ + Polyline32( hdc, pts, cCount + 1 ); + + /* Move to last point */ + MoveToEx32( hdc, (pts + cCount)->x, (pts + cCount)->y, NULL ); + + HeapFree( GetProcessHeap(), 0, pts ); + return TRUE; } /**********************************************************************