Evan Stade : gdiplus: Use DrawText instead of TabbedTextOut.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Aug 16 05:38:37 CDT 2007
Module: wine
Branch: master
Commit: be66c3c93b0b4089deaedb75ea658c71af102eb2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=be66c3c93b0b4089deaedb75ea658c71af102eb2
Author: Evan Stade <estade at gmail.com>
Date: Wed Aug 15 16:22:17 2007 -0700
gdiplus: Use DrawText instead of TabbedTextOut.
---
dlls/gdiplus/graphics.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index f6e08c5..17d8611 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1287,6 +1287,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
INT sum = 0, height = 0, fit, fitcpy, save_state, i, j, lret, nwidth,
nheight;
SIZE size;
+ RECT drawcoord;
if(!graphics || !string || !font || !brush || !rect)
return InvalidParameter;
@@ -1366,15 +1367,16 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
length = j;
while(sum < length){
+ drawcoord.left = corners[0].x + roundr(ang_sin * (REAL) height);
+ drawcoord.top = corners[0].y + roundr(ang_cos * (REAL) height);
+
GetTextExtentExPointW(graphics->hdc, stringdup + sum, length - sum,
nwidth, &fit, NULL, &size);
fitcpy = fit;
if(fit == 0){
- TabbedTextOutW(graphics->hdc,
- corners[0].x + roundr(ang_sin * (REAL) height),
- corners[0].y + roundr(ang_cos * (REAL) height),
- stringdup + sum, 1, 0, 0, 0);
+ DrawTextW(graphics->hdc, stringdup + sum, 1, &drawcoord, DT_NOCLIP |
+ DT_EXPANDTABS);
break;
}
@@ -1402,10 +1404,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
}
}
}
- TabbedTextOutW(graphics->hdc,
- corners[0].x - roundr(ang_sin * (REAL) height),
- corners[0].y + roundr(ang_cos * (REAL) height),
- stringdup + sum, min(length - sum, fit), 0, 0, 0);
+ DrawTextW(graphics->hdc, stringdup + sum, min(length - sum, fit),
+ &drawcoord, DT_NOCLIP | DT_EXPANDTABS);
sum += fit + (lret < fitcpy ? 1 : 0);
height += size.cy;
More information about the wine-cvs
mailing list