Commit 11754452 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Change the sign we use for origin.x in DrawDriverString.

Apparently characters whose black boxes extend to the left of the origin have a negative x value, but characters whose black boxes extend above the origin have a positive y value.
parent 7b2c6476
......@@ -5753,9 +5753,9 @@ static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UI
if (glyphsize > max_glyphsize)
max_glyphsize = glyphsize;
left = pti[i].x - glyphmetrics.gmptGlyphOrigin.x;
left = pti[i].x + glyphmetrics.gmptGlyphOrigin.x;
top = pti[i].y - glyphmetrics.gmptGlyphOrigin.y;
right = pti[i].x - glyphmetrics.gmptGlyphOrigin.x + glyphmetrics.gmBlackBoxX;
right = pti[i].x + glyphmetrics.gmptGlyphOrigin.x + glyphmetrics.gmBlackBoxX;
bottom = pti[i].y - glyphmetrics.gmptGlyphOrigin.y + glyphmetrics.gmBlackBoxY;
if (left < min_x) min_x = left;
......@@ -5786,7 +5786,7 @@ static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UI
GetGlyphOutlineW(hdc, text[i], ggo_flags,
&glyphmetrics, max_glyphsize, glyph_mask, &identity);
left = pti[i].x - glyphmetrics.gmptGlyphOrigin.x;
left = pti[i].x + glyphmetrics.gmptGlyphOrigin.x;
top = pti[i].y - glyphmetrics.gmptGlyphOrigin.y;
stride = (glyphmetrics.gmBlackBoxX + 3) & (~3);
......
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