2 * win16 driver text functions
4 * Copyright 1996 John Harvey
15 /***********************************************************************
18 BOOL32
WIN16DRV_ExtTextOut( DC
*dc
, INT32 x
, INT32 y
, UINT32 flags
,
19 const RECT32
*lprect
, LPCSTR str
, UINT32 count
,
22 WIN16DRV_PDEVICE
*physDev
= (WIN16DRV_PDEVICE
*)dc
->physDev
;
26 RECT16
*lpOpaqueRect
= NULL
;
34 TRACE(win16drv
, "%04x %d %d %x %p %*s %p\n",
35 dc
->hSelf
, x
, y
, flags
, lprect
, count
> 0 ? count
: 8, str
, lpDx
);
45 clipRect
.right
= dc
->w
.devCaps
->horzRes
;
46 clipRect
.bottom
= dc
->w
.devCaps
->vertRes
;
49 opaqueRect
.left
= lprect
->left
;
50 opaqueRect
.top
= lprect
->top
;
51 opaqueRect
.right
= lprect
->right
;
52 opaqueRect
.bottom
= lprect
->bottom
;
53 lpOpaqueRect
= &opaqueRect
;
57 TRACE(win16drv
, "textalign = %d\n", dc
->w
.textAlign
);
59 if (dc
->w
.textAlign
& TA_UPDATECP
)
68 dwRet
= PRTDRV_ExtTextOut(physDev
->segptrPDEVICE
, 0, 0,
69 NULL
, str
, -count
, physDev
->FontInfo
,
70 win16drv_SegPtr_DrawMode
, win16drv_SegPtr_TextXForm
,
73 width
= LOWORD(dwRet
);
75 switch( dc
->w
.textAlign
& (TA_LEFT
| TA_RIGHT
| TA_CENTER
) )
78 if (dc
->w
.textAlign
& TA_UPDATECP
)
79 dc
->w
.CursPosX
= XDPTOLP( dc
, x
+ width
);
83 if (dc
->w
.textAlign
& TA_UPDATECP
)
84 dc
->w
.CursPosX
= XDPTOLP( dc
, x
);
91 switch( dc
->w
.textAlign
& (TA_TOP
| TA_BOTTOM
| TA_BASELINE
) )
96 y
-= physDev
->FontInfo
->dfPixHeight
;
99 y
-= physDev
->FontInfo
->dfAscent
;
103 dwRet
= PRTDRV_ExtTextOut(physDev
->segptrPDEVICE
,
104 x
, y
, &clipRect
, str
, wCount
,
105 physDev
->FontInfo
, win16drv_SegPtr_DrawMode
,
106 win16drv_SegPtr_TextXForm
, NULL
, lpOpaqueRect
, wOptions
);