Pass the breakExtra value in the ExtTextOut driver call, since there

is no function to retrieve it from the HDC.
This commit is contained in:
Alexandre Julliard 2004-03-04 01:42:57 +00:00
parent 0a25dd4668
commit 8d18b2a518
16 changed files with 36 additions and 40 deletions

View File

@ -77,7 +77,7 @@ extern BOOL EMFDRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color,
extern INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode );
extern BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y,
UINT flags, const RECT *lprect, LPCWSTR str,
UINT count, const INT *lpDx );
UINT count, const INT *lpDx, INT breakExtra );
extern BOOL EMFDRV_FillPath( PHYSDEV dev );
extern BOOL EMFDRV_FillRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush );
extern BOOL EMFDRV_FlattenPath( PHYSDEV dev );

View File

@ -650,7 +650,7 @@ EMFDRV_SetTextColor( PHYSDEV dev, COLORREF color )
*/
BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR str, UINT count,
const INT *lpDx )
const INT *lpDx, INT breakExtra )
{
EMREXTTEXTOUTW *pemr;
DWORD nSize;

View File

@ -76,7 +76,7 @@ typedef struct tagDC_FUNCS
INT (*pExtEscape)(PHYSDEV,INT,INT,LPCVOID,INT,LPVOID);
BOOL (*pExtFloodFill)(PHYSDEV,INT,INT,COLORREF,UINT);
INT (*pExtSelectClipRgn)(PHYSDEV,HRGN,INT);
BOOL (*pExtTextOut)(PHYSDEV,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*);
BOOL (*pExtTextOut)(PHYSDEV,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*,INT);
BOOL (*pFillPath)(PHYSDEV);
BOOL (*pFillRgn)(PHYSDEV,HRGN,HBRUSH);
BOOL (*pFlattenPath)(PHYSDEV);

View File

@ -83,7 +83,7 @@ extern BOOL MFDRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT
extern INT MFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode );
extern BOOL MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y,
UINT flags, const RECT *lprect, LPCWSTR str,
UINT count, const INT *lpDx );
UINT count, const INT *lpDx, INT breakExtra );
extern BOOL MFDRV_FillPath( PHYSDEV dev );
extern BOOL MFDRV_FillRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush );
extern BOOL MFDRV_FlattenPath( PHYSDEV dev );

View File

@ -74,7 +74,7 @@ static BOOL MFDRV_MetaExtTextOut( PHYSDEV dev, short x, short y, UINT16 flags,
BOOL
MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR str, UINT count,
const INT *lpDx )
const INT *lpDx, INT breakExtra )
{
RECT16 rect16;
LPINT16 lpdx16 = NULL;

View File

@ -338,7 +338,7 @@ BOOL TTYDRV_DC_StretchBlt(TTYDRV_PDEVICE *physDevDst, INT xDst, INT yDst,
*/
BOOL TTYDRV_DC_ExtTextOut(TTYDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lpRect, LPCWSTR str, UINT count,
const INT *lpDx)
const INT *lpDx, INT breakExtra )
{
#ifdef WINE_CURSES
INT row, col;

View File

@ -76,7 +76,7 @@ extern BOOL TTYDRV_DC_BitBlt(TTYDRV_PDEVICE *physDevDst, INT xDst, INT yDst, INT
extern BOOL TTYDRV_DC_Chord(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
extern BOOL TTYDRV_DC_Ellipse(TTYDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom);
extern BOOL TTYDRV_DC_ExtFloodFill(TTYDRV_PDEVICE *physDev, INT x, INT y, COLORREF color, UINT fillType);
extern BOOL TTYDRV_DC_ExtTextOut(TTYDRV_PDEVICE *physDev, INT x, INT y, UINT flags, const RECT *lpRect, LPCWSTR str, UINT count, const INT *lpDx);
extern BOOL TTYDRV_DC_ExtTextOut(TTYDRV_PDEVICE *physDev, INT x, INT y, UINT flags, const RECT *lpRect, LPCWSTR str, UINT count, const INT *lpDx, INT breakExtra);
extern BOOL TTYDRV_DC_GetCharWidth(TTYDRV_PDEVICE *physDev, UINT firstChar, UINT lastChar, LPINT buffer);
extern COLORREF TTYDRV_DC_GetPixel(TTYDRV_PDEVICE *physDev, INT x, INT y);

View File

@ -7,7 +7,7 @@
@ cdecl DeleteDC(ptr) TTYDRV_DC_DeleteDC
@ cdecl Ellipse(ptr long long long long) TTYDRV_DC_Ellipse
@ cdecl ExtFloodFill(ptr long long long long) TTYDRV_DC_ExtFloodFill
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr) TTYDRV_DC_ExtTextOut
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr long) TTYDRV_DC_ExtTextOut
@ cdecl GetBitmapBits(long ptr long) TTYDRV_GetBitmapBits
@ cdecl GetCharWidth(ptr long long ptr) TTYDRV_DC_GetCharWidth
@ cdecl GetDCOrgEx(ptr ptr) TTYDRV_GetDCOrgEx

View File

@ -471,7 +471,7 @@ extern INT PSDRV_EndDoc( PSDRV_PDEVICE *physDev );
extern INT PSDRV_EndPage( PSDRV_PDEVICE *physDev );
extern BOOL PSDRV_ExtTextOut( PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR str, UINT count,
const INT *lpDx );
const INT *lpDx, INT breakExtra );
extern BOOL PSDRV_GetCharWidth( PSDRV_PDEVICE *physDev, UINT firstChar, UINT lastChar,
LPINT buffer );
extern BOOL PSDRV_GetTextExtentPoint( PSDRV_PDEVICE *physDev, LPCWSTR str, INT count,

View File

@ -18,10 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <string.h>
#include "gdi.h"
#include <stdarg.h>
#include <math.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "psdrv.h"
#include "wine/debug.h"
#include "winspool.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
@ -34,7 +39,7 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
*/
BOOL PSDRV_ExtTextOut( PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR str, UINT count,
const INT *lpDx )
const INT *lpDx, INT breakExtra )
{
BOOL bResult = TRUE;
BOOL bClipped = FALSE;
@ -96,7 +101,6 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
POINT pt;
INT ascent, descent;
WORD *glyphs = NULL;
DC *dc = physDev->dc;
UINT align = GetTextAlign( physDev->hdc );
INT char_extra;
INT *deltas = NULL;
@ -124,13 +128,9 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
}
}
if(align & TA_UPDATECP) {
x = dc->CursPosX;
y = dc->CursPosY;
}
pt.x = x;
pt.y = y;
if(align & TA_UPDATECP) GetCurrentPositionEx( physDev->hdc, &pt );
LPtoDP(physDev->hdc, &pt, 1);
x = pt.x;
y = pt.y;
@ -188,8 +188,7 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
pt.x = x + sz.cx * cosEsc;
pt.y = y - sz.cx * sinEsc;
DPtoLP( physDev->hdc, &pt, 1 );
dc->CursPosX = pt.x;
dc->CursPosY = pt.y;
MoveToEx( physDev->hdc, pt.x, pt.y, NULL );
}
break;
@ -207,8 +206,7 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
pt.x = x;
pt.y = y;
DPtoLP( physDev->hdc, &pt, 1 );
dc->CursPosX = pt.x;
dc->CursPosY = pt.y;
MoveToEx( physDev->hdc, pt.x, pt.y, NULL );
}
break;
}

View File

@ -11,7 +11,7 @@
@ cdecl EnumDeviceFonts(ptr ptr ptr long) PSDRV_EnumDeviceFonts
@ cdecl ExtDeviceMode(ptr long ptr ptr ptr ptr ptr long) PSDRV_ExtDeviceMode
@ cdecl ExtEscape(ptr long long ptr long ptr) PSDRV_ExtEscape
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr) PSDRV_ExtTextOut
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr long) PSDRV_ExtTextOut
@ cdecl GetCharWidth(ptr long long ptr) PSDRV_GetCharWidth
@ cdecl GetDeviceCaps(ptr long) PSDRV_GetDeviceCaps
@ cdecl GetTextExtentPoint(ptr ptr long ptr) PSDRV_GetTextExtentPoint

View File

@ -44,7 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(text);
BOOL
X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
const INT *lpDx )
const INT *lpDx, INT breakExtra )
{
int i;
fontObject* pfo;
@ -58,14 +58,11 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
BOOL result = TRUE;
HRGN saved_region = 0;
POINT pt;
DC *dc = physDev->dc;
UINT align = GetTextAlign( physDev->hdc );
INT charExtra = GetTextCharacterExtra( physDev->hdc );
if(dc->gdiFont)
return X11DRV_XRender_ExtTextOut(physDev, x, y, flags, lprect, wstr, count,
lpDx);
if(physDev->dc->gdiFont)
return X11DRV_XRender_ExtTextOut(physDev, x, y, flags, lprect, wstr, count, lpDx, breakExtra);
if (!X11DRV_SetupGCForText( physDev )) return TRUE;
@ -271,7 +268,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
wine_tsx11_unlock();
if(!rotated)
{
if (!charExtra && !dc->breakExtra && !lpDx)
if (!charExtra && !breakExtra && !lpDx)
{
X11DRV_cptable[pfo->fi->cptable].pDrawString(
pfo, gdi_display, physDev->drawable, physDev->gc,
@ -293,7 +290,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
long ve_we;
unsigned short err = 0;
ve_we = (LONG)(dc->xformWorld2Vport.eM11 * 0x10000);
ve_we = (LONG)(physDev->dc->xformWorld2Vport.eM11 * 0x10000);
while (i < count)
{
@ -338,7 +335,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
{
delta += charExtra;
if (str2b[i].byte2 == (char)dfBreakChar)
delta += dc->breakExtra;
delta += breakExtra;
pitem->nchars++;
} while ((++i < count) && !delta);
pitem++;
@ -381,7 +378,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
* pfo->lpX11Trans->pixelsize / 1000.0;
offset += charExtra;
if (str2b[i].byte2 == (char)dfBreakChar)
offset += dc->breakExtra;
offset += breakExtra;
}
}
}

View File

@ -169,7 +169,7 @@ extern BOOL X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y,
COLORREF color, UINT fillType );
extern BOOL X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y,
UINT flags, const RECT *lprect,
LPCWSTR str, UINT count, const INT *lpDx );
LPCWSTR str, UINT count, const INT *lpDx, INT breakExtra );
extern LONG X11DRV_SetBitmapBits( HBITMAP hbitmap, const void *bits, LONG count );
extern void X11DRV_SetDeviceClipping( X11DRV_PDEVICE *physDev, HRGN vis_rgn, HRGN clip_rgn );
extern INT X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest,
@ -231,7 +231,7 @@ extern BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE*, HFONT);
extern void X11DRV_XRender_DeleteDC(X11DRV_PDEVICE*);
extern BOOL X11DRV_XRender_ExtTextOut(X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr,
UINT count, const INT *lpDx);
UINT count, const INT *lpDx, INT breakExtra);
extern void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev);
extern void X11DRV_OpenGL_Init(Display *display);

View File

@ -14,7 +14,7 @@
@ cdecl EnumDeviceFonts(ptr ptr ptr long) X11DRV_EnumDeviceFonts
@ cdecl ExtEscape(ptr long long ptr long ptr) X11DRV_ExtEscape
@ cdecl ExtFloodFill(ptr long long long long) X11DRV_ExtFloodFill
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr) X11DRV_ExtTextOut
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr long) X11DRV_ExtTextOut
@ cdecl GetBitmapBits(long ptr long) X11DRV_GetBitmapBits
@ cdecl GetCharWidth(ptr long long ptr) X11DRV_GetCharWidth
@ cdecl GetDCOrgEx(ptr ptr) X11DRV_GetDCOrgEx

View File

@ -930,7 +930,7 @@ static int XRenderErrorHandler(Display *dpy, XErrorEvent *event, void *arg)
*/
BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
const INT *lpDx )
const INT *lpDx, INT breakExtra )
{
XRenderColor col;
int idx;
@ -1514,7 +1514,7 @@ void X11DRV_XRender_DeleteDC(X11DRV_PDEVICE *physDev)
BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
const INT *lpDx )
const INT *lpDx, INT breakExtra )
{
assert(0);
return FALSE;

View File

@ -166,10 +166,11 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
lpReorderedString, count, NULL );
ret = dc->funcs->pExtTextOut(dc->physDev,x,y,flags|ETO_IGNORELANGUAGE,
lprect,lpReorderedString,count,lpDx);
lprect,lpReorderedString,count,lpDx,dc->breakExtra);
HeapFree(GetProcessHeap(), 0, lpReorderedString);
} else
ret = dc->funcs->pExtTextOut(dc->physDev,x,y,flags,lprect,str,count,lpDx);
ret = dc->funcs->pExtTextOut(dc->physDev,x,y,flags,lprect,str,count,
lpDx,dc->breakExtra);
}
GDI_ReleaseObj( hdc );
}