is no function to retrieve it from the HDC.
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 );
*/
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;
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);
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 );
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;
*/
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;
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);
@ 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
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,
* 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);
*/
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;
POINT pt;
INT ascent, descent;
WORD *glyphs = NULL;
- DC *dc = physDev->dc;
UINT align = GetTextAlign( physDev->hdc );
INT char_extra;
INT *deltas = NULL;
}
}
- 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;
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;
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;
}
@ 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
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;
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;
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,
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)
{
{
delta += charExtra;
if (str2b[i].byte2 == (char)dfBreakChar)
- delta += dc->breakExtra;
+ delta += breakExtra;
pitem->nchars++;
} while ((++i < count) && !delta);
pitem++;
* pfo->lpX11Trans->pixelsize / 1000.0;
offset += charExtra;
if (str2b[i].byte2 == (char)dfBreakChar)
- offset += dc->breakExtra;
+ offset += breakExtra;
}
}
}
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,
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);
@ 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
*/
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;
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;
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 );
}