[14/14] gdiplus: Reimplement GdipDrawPath.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Feb 18 21:46:01 CST 2013
Please don't apply this [14/14] patch, it causes a test failure. I'm sending
it to show how this is going to look like eventually.
---
dlls/gdiplus/graphics.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 01e127c..7e4eb7f 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3333,8 +3333,8 @@ GpStatus WINGDIPAPI GdipDrawLinesI(GpGraphics *graphics, GpPen *pen, GDIPCONST
GpStatus WINGDIPAPI GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
{
- INT save_state;
- GpStatus retval;
+ GpStatus status;
+ GpPath *flat_path;
TRACE("(%p, %p, %p)\n", graphics, pen, path);
@@ -3344,20 +3344,15 @@ GpStatus WINGDIPAPI GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
if(graphics->busy)
return ObjectBusy;
- if (!graphics->hdc)
- {
- FIXME("graphics object has no HDC\n");
- return Ok;
- }
-
- save_state = prepare_dc(graphics, pen);
-
- retval = draw_poly(graphics, pen, path->pathdata.Points,
- path->pathdata.Types, path->pathdata.Count, TRUE);
+ status = GdipClonePath(path, &flat_path);
+ if (status != Ok) return status;
- restore_dc(graphics, save_state);
+ status = GdipWidenPath(flat_path, pen, NULL, FlatnessDefault);
+ if (status == Ok)
+ status = GdipFillPath(graphics, pen->brush, flat_path);
- return retval;
+ GdipDeletePath(flat_path);
+ return status;
}
GpStatus WINGDIPAPI GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x,
--
1.8.1.3
More information about the wine-patches
mailing list