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.
This commit is contained in:
Vincent Povirk 2011-05-23 16:33:46 -05:00 committed by Alexandre Julliard
parent 7b2c647669
commit 11754452d2
1 changed files with 3 additions and 3 deletions

View File

@ -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);