2 * win16 driver text functions
4 * Copyright 1996 John Harvey
13 /* #define DEBUG_WIN16DRV */
16 /***********************************************************************
19 BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
20 const RECT32 *lprect, LPCSTR str, UINT32 count,
23 WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
27 RECT16 *lpOpaqueRect = NULL;
31 static BOOL32 bInit = FALSE;
38 dprintf_win16drv(stddeb, "WIN16DRV_ExtTextOut: %04x %d %d %x %p %*s %p\n", dc->hSelf, x, y,
39 flags, lprect, count > 0 ? count : 8, str, lpDx);
46 dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, 0, 0,
48 -1, physDev->segptrFontInfo, win16drv_SegPtr_DrawMode,
49 win16drv_SegPtr_TextXForm, NULL, NULL, 0);
59 clipRect.right = dc->w.devCaps->horzRes;
60 clipRect.bottom = dc->w.devCaps->vertRes;
63 opaqueRect.left = lprect->left;
64 opaqueRect.top = lprect->top;
65 opaqueRect.right = lprect->right;
66 opaqueRect.bottom = lprect->bottom;
67 lpOpaqueRect = &opaqueRect;
74 FONTINFO16 *p = (FONTINFO16 *)PTR_SEG_TO_LIN(physDev->segptrFontInfo);
76 rcPageSize.right = 0x3c0;
79 rcPageSize.bottom = 0x630;
84 if(y < rcPageSize.top || y + p->dfPixHeight > rcPageSize.bottom)
86 printf("Failed 1 y %d top %d y +height %d bottom %d\n",
87 y, rcPageSize.top , y + p->dfPixHeight , rcPageSize.bottom);
91 if(x >= rcPageSize.right ||
92 x + wCount * p->dfPixWidth < rcPageSize.left)
100 dwRet = PRTDRV_ExtTextOut(physDev->segptrPDEVICE, XLPTODP(dc,x), YLPTODP(dc,y),
102 wCount, physDev->segptrFontInfo, win16drv_SegPtr_DrawMode,
103 win16drv_SegPtr_TextXForm, NULL, lpOpaqueRect, wOptions);