Module: wine Branch: master Commit: fe000c773ce89961a4dcfbf6eee75c5833911539 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fe000c773ce89961a4dcfbf6ee...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu Jun 21 15:51:37 2012 -0500
gdiplus: Fix vertical alignment calculation in GdipAddPathString.
---
dlls/gdiplus/graphicspath.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index df9613d..471f915 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1008,12 +1008,12 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT } if (format && format->vertalign == StringAlignmentCenter && layoutRect->Y + args.maxY < layoutRect->Height) { - float inc = layoutRect->Height - args.maxY - layoutRect->Y; + float inc = layoutRect->Height + layoutRect->Y - args.maxY; inc /= 2; for (i = backup->pathdata.Count; i < path->pathdata.Count; ++i) path->pathdata.Points[i].Y += inc; } else if (format && format->vertalign == StringAlignmentFar) { - float inc = layoutRect->Height - args.maxY - layoutRect->Y; + float inc = layoutRect->Height + layoutRect->Y - args.maxY; for (i = backup->pathdata.Count; i < path->pathdata.Count; ++i) path->pathdata.Points[i].Y += inc; }