Commit 69d5a561 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Fix the sign of the vertical text position in ExtTextOutW.

parent 30feb19d
...@@ -1935,7 +1935,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, ...@@ -1935,7 +1935,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if (align & TA_UPDATECP) if (align & TA_UPDATECP)
{ {
pt.x = x + width.x; pt.x = x + width.x;
pt.y = y - width.y; pt.y = y + width.y;
DPtoLP(hdc, &pt, 1); DPtoLP(hdc, &pt, 1);
MoveToEx(hdc, pt.x, pt.y, NULL); MoveToEx(hdc, pt.x, pt.y, NULL);
} }
...@@ -1943,12 +1943,12 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, ...@@ -1943,12 +1943,12 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
case TA_CENTER: case TA_CENTER:
x -= width.x / 2; x -= width.x / 2;
y += width.y / 2; y -= width.y / 2;
break; break;
case TA_RIGHT: case TA_RIGHT:
x -= width.x; x -= width.x;
y += width.y; y -= width.y;
if (align & TA_UPDATECP) if (align & TA_UPDATECP)
{ {
pt.x = x; pt.x = x;
...@@ -2129,7 +2129,7 @@ done: ...@@ -2129,7 +2129,7 @@ done:
pts[0].x = x - underlinePos * sinEsc; pts[0].x = x - underlinePos * sinEsc;
pts[0].y = y - underlinePos * cosEsc; pts[0].y = y - underlinePos * cosEsc;
pts[1].x = x + width.x - underlinePos * sinEsc; pts[1].x = x + width.x - underlinePos * sinEsc;
pts[1].y = y - width.y - underlinePos * cosEsc; pts[1].y = y + width.y - underlinePos * cosEsc;
pts[2].x = pts[1].x + underlineWidth * sinEsc; pts[2].x = pts[1].x + underlineWidth * sinEsc;
pts[2].y = pts[1].y + underlineWidth * cosEsc; pts[2].y = pts[1].y + underlineWidth * cosEsc;
pts[3].x = pts[0].x + underlineWidth * sinEsc; pts[3].x = pts[0].x + underlineWidth * sinEsc;
...@@ -2145,7 +2145,7 @@ done: ...@@ -2145,7 +2145,7 @@ done:
pts[0].x = x - strikeoutPos * sinEsc; pts[0].x = x - strikeoutPos * sinEsc;
pts[0].y = y - strikeoutPos * cosEsc; pts[0].y = y - strikeoutPos * cosEsc;
pts[1].x = x + width.x - strikeoutPos * sinEsc; pts[1].x = x + width.x - strikeoutPos * sinEsc;
pts[1].y = y - width.y - strikeoutPos * cosEsc; pts[1].y = y + width.y - strikeoutPos * cosEsc;
pts[2].x = pts[1].x + strikeoutWidth * sinEsc; pts[2].x = pts[1].x + strikeoutWidth * sinEsc;
pts[2].y = pts[1].y + strikeoutWidth * cosEsc; pts[2].y = pts[1].y + strikeoutWidth * cosEsc;
pts[3].x = pts[0].x + strikeoutWidth * sinEsc; pts[3].x = pts[0].x + strikeoutWidth * sinEsc;
...@@ -2172,7 +2172,7 @@ done: ...@@ -2172,7 +2172,7 @@ done:
pts[0].x = x; pts[0].x = x;
pts[0].y = y; pts[0].y = y;
pts[1].x = x + width.x; pts[1].x = x + width.x;
pts[1].y = y - width.y; pts[1].y = y + width.y;
DPtoLP(hdc, pts, 2); DPtoLP(hdc, pts, 2);
MoveToEx(hdc, pts[0].x - underlinePos * sinEsc, pts[0].y - underlinePos * cosEsc, &oldpt); MoveToEx(hdc, pts[0].x - underlinePos * sinEsc, pts[0].y - underlinePos * cosEsc, &oldpt);
LineTo(hdc, pts[1].x - underlinePos * sinEsc, pts[1].y - underlinePos * cosEsc); LineTo(hdc, pts[1].x - underlinePos * sinEsc, pts[1].y - underlinePos * cosEsc);
...@@ -2187,7 +2187,7 @@ done: ...@@ -2187,7 +2187,7 @@ done:
pts[0].x = x; pts[0].x = x;
pts[0].y = y; pts[0].y = y;
pts[1].x = x + width.x; pts[1].x = x + width.x;
pts[1].y = y - width.y; pts[1].y = y + width.y;
DPtoLP(hdc, pts, 2); DPtoLP(hdc, pts, 2);
MoveToEx(hdc, pts[0].x - strikeoutPos * sinEsc, pts[0].y - strikeoutPos * cosEsc, &oldpt); MoveToEx(hdc, pts[0].x - strikeoutPos * sinEsc, pts[0].y - strikeoutPos * cosEsc, &oldpt);
LineTo(hdc, pts[1].x - strikeoutPos * sinEsc, pts[1].y - strikeoutPos * cosEsc); LineTo(hdc, pts[1].x - strikeoutPos * sinEsc, pts[1].y - strikeoutPos * cosEsc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment