Module: wine Branch: master Commit: f6f04f6e0ede8f7add6db6874a2c294fc993e900 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f6f04f6e0ede8f7add6db6874a...
Author: Evan Stade estade@gmail.com Date: Thu Jun 21 16:15:13 2007 -0700
gdiplus: Implemented GdipDrawLines.
---
dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 21 +++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 775bde3..db9dd46 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -176,7 +176,7 @@ @ stub GdipDrawImageRectRectI @ stub GdipDrawLine @ stdcall GdipDrawLineI(ptr ptr long long long long) -@ stub GdipDrawLines +@ stdcall GdipDrawLines(ptr ptr ptr long) @ stub GdipDrawLinesI @ stub GdipDrawPath @ stdcall GdipDrawPie(ptr ptr long long long long long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index f917b65..beba700 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -259,6 +259,27 @@ GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, return Ok; }
+GpStatus WINGDIPAPI GdipDrawLines(GpGraphics *graphics, GpPen *pen, GDIPCONST + GpPointF *points, INT count) +{ + HGDIOBJ old_obj; + INT i; + + if(!pen || !graphics || (count < 2)) + return InvalidParameter; + + old_obj = SelectObject(graphics->hdc, pen->gdipen); + MoveToEx(graphics->hdc, roundr(points[0].X), roundr(points[0].Y), NULL); + + for(i = 1; i < count; i++){ + LineTo(graphics->hdc, roundr(points[i].X), roundr(points[i].Y)); + } + + SelectObject(graphics->hdc, old_obj); + + return Ok; +} + GpStatus WINGDIPAPI GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index e5c46b3..93905fd 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -38,6 +38,7 @@ GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL, REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL); GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT); +GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL);