2 * win16 driver text functions
4 * Copyright 1996 John Harvey
14 DEFAULT_DEBUG_CHANNEL(win16drv
)
16 /***********************************************************************
19 BOOL
WIN16DRV_ExtTextOut( DC
*dc
, INT x
, INT y
, UINT flags
,
20 const RECT
*lprect
, LPCSTR str
, UINT count
,
23 WIN16DRV_PDEVICE
*physDev
= (WIN16DRV_PDEVICE
*)dc
->physDev
;
27 RECT16
*lpOpaqueRect
= NULL
;
35 TRACE(win16drv
, "%04x %d %d %x %p %*s %p\n",
36 dc
->hSelf
, x
, y
, flags
, lprect
, count
> 0 ? count
: 8, str
, lpDx
);
46 clipRect
.right
= dc
->w
.devCaps
->horzRes
;
47 clipRect
.bottom
= dc
->w
.devCaps
->vertRes
;
50 opaqueRect
.left
= lprect
->left
;
51 opaqueRect
.top
= lprect
->top
;
52 opaqueRect
.right
= lprect
->right
;
53 opaqueRect
.bottom
= lprect
->bottom
;
54 lpOpaqueRect
= &opaqueRect
;
58 TRACE(win16drv
, "textalign = %d\n", dc
->w
.textAlign
);
60 if (dc
->w
.textAlign
& TA_UPDATECP
)
69 dwRet
= PRTDRV_ExtTextOut(physDev
->segptrPDEVICE
, 0, 0,
70 NULL
, str
, -count
, physDev
->FontInfo
,
71 win16drv_SegPtr_DrawMode
, win16drv_SegPtr_TextXForm
,
74 width
= LOWORD(dwRet
);
76 switch( dc
->w
.textAlign
& (TA_LEFT
| TA_RIGHT
| TA_CENTER
) )
79 if (dc
->w
.textAlign
& TA_UPDATECP
)
80 dc
->w
.CursPosX
= XDPTOLP( dc
, x
+ width
);
84 if (dc
->w
.textAlign
& TA_UPDATECP
)
85 dc
->w
.CursPosX
= XDPTOLP( dc
, x
);
92 switch( dc
->w
.textAlign
& (TA_TOP
| TA_BOTTOM
| TA_BASELINE
) )
97 y
-= physDev
->FontInfo
->dfPixHeight
;
100 y
-= physDev
->FontInfo
->dfAscent
;
104 dwRet
= PRTDRV_ExtTextOut(physDev
->segptrPDEVICE
,
105 x
, y
, &clipRect
, str
, wCount
,
106 physDev
->FontInfo
, win16drv_SegPtr_DrawMode
,
107 win16drv_SegPtr_TextXForm
, NULL
, lpOpaqueRect
, wOptions
);