diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 443370a7878..af7ef43b9ff 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -450,7 +450,7 @@ struct GpStringFormat{ StringAlignment align; StringTrimming trimming; HotkeyPrefix hkprefix; - StringAlignment vertalign; + StringAlignment line_align; StringDigitSubstitute digitsub; INT tabcount; REAL firsttab; diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index beedb9ea4aa..4d8bdd750da 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5417,19 +5417,19 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string /* Should be no need to explicitly test for StringAlignmentNear as * that is default behavior if no alignment is passed. */ - if(format->vertalign != StringAlignmentNear){ + if(format->line_align != StringAlignmentNear){ RectF bounds, in_rect = *rect; in_rect.Height = 0.0; /* avoid height clipping */ GdipMeasureString(graphics, string, length, font, &in_rect, format, &bounds, 0, 0); TRACE("bounds %s\n", debugstr_rectf(&bounds)); - if(format->vertalign == StringAlignmentCenter) + if(format->line_align == StringAlignmentCenter) offsety = (rect->Height - bounds.Height) / 2; - else if(format->vertalign == StringAlignmentFar) + else if(format->line_align == StringAlignmentFar) offsety = (rect->Height - bounds.Height); } - TRACE("vertical align %d, offsety %f\n", format->vertalign, offsety); + TRACE("line align %d, offsety %f\n", format->line_align, offsety); } save_state = SaveDC(hdc); diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 4d70796f75a..3d33c293081 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1028,13 +1028,13 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT heap_free(backup); return status; } - if (format && format->vertalign == StringAlignmentCenter && layoutRect->Y + args.maxY < layoutRect->Height) + if (format && format->line_align == StringAlignmentCenter && layoutRect->Y + args.maxY < layoutRect->Height) { 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) { + } else if (format && format->line_align == StringAlignmentFar) { float inc = layoutRect->Height + layoutRect->Y - args.maxY; for (i = backup->pathdata.Count; i < path->pathdata.Count; ++i) path->pathdata.Points[i].Y += inc; diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 660731d7ce9..e376e7b36c3 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -178,7 +178,7 @@ GpStatus WINGDIPAPI GdipGetStringFormatLineAlign(GpStringFormat *format, if(!format || !align) return InvalidParameter; - *align = format->vertalign; + *align = format->line_align; return Ok; } @@ -282,7 +282,7 @@ GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat *format, if(!format) return InvalidParameter; - format->vertalign = align; + format->line_align = align; return Ok; }