Vincent Povirk : gdiplus: Store the rect passed to GdipCreateLineBrushFromRect.
Alexandre Julliard
julliard at winehq.org
Fri May 8 08:06:27 CDT 2009
Module: wine
Branch: master
Commit: aaee4d7f9d423496eecb626bfc6da7286c4e9308
URL: http://source.winehq.org/git/wine.git/?a=commit;h=aaee4d7f9d423496eecb626bfc6da7286c4e9308
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Thu May 7 11:40:13 2009 -0500
gdiplus: Store the rect passed to GdipCreateLineBrushFromRect.
---
dlls/gdiplus/brush.c | 8 +++++++-
dlls/gdiplus/tests/brush.c | 8 ++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 7372ec0..cd1ba7f 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -301,6 +301,7 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF* rect,
GpLineGradient **line)
{
GpPointF start, end;
+ GpStatus stat;
TRACE("(%p, %x, %x, %d, %d, %p)\n", rect, startcolor, endcolor, mode,
wrap, line);
@@ -313,7 +314,12 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF* rect,
end.X = rect->X + rect->Width;
end.Y = rect->Y + rect->Height;
- return GdipCreateLineBrush(&start, &end, startcolor, endcolor, wrap, line);
+ stat = GdipCreateLineBrush(&start, &end, startcolor, endcolor, wrap, line);
+
+ if (stat == Ok)
+ (*line)->rect = *rect;
+
+ return stat;
}
GpStatus WINGDIPAPI GdipCreateLineBrushFromRectI(GDIPCONST GpRect* rect,
diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c
index 8ce5adb..b6fbe30 100644
--- a/dlls/gdiplus/tests/brush.c
+++ b/dlls/gdiplus/tests/brush.c
@@ -379,10 +379,10 @@ static void test_gradientgetrect(void)
memset(&rectf, 0, sizeof(GpRectF));
status = GdipGetLineRect(brush, &rectf);
expect(Ok, status);
- todo_wine expectf(10.0, rectf.X);
- todo_wine expectf(10.0, rectf.Y);
- todo_wine expectf(-100.0, rectf.Width);
- todo_wine expectf(-100.0, rectf.Height);
+ expectf(10.0, rectf.X);
+ expectf(10.0, rectf.Y);
+ expectf(-100.0, rectf.Width);
+ expectf(-100.0, rectf.Height);
status = GdipDeleteBrush((GpBrush*)brush);
}
More information about the wine-cvs
mailing list