mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NtGDI] Adding Support for Viewport TextOut
Add Viewport changes to Text Out Batch.
This commit is contained in:
parent
dcaaf3e7af
commit
04a04659da
1 changed files with 34 additions and 2 deletions
|
@ -246,12 +246,13 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
|||
PGDIBSTEXTOUT pgO;
|
||||
COLORREF crColor = -1, crBkColor;
|
||||
ULONG ulForegroundClr, ulBackgroundClr;
|
||||
DWORD flags = 0, saveflags;
|
||||
DWORD flags = 0, flXform = 0, saveflags, saveflXform = 0;
|
||||
FLONG flTextAlign = -1;
|
||||
HANDLE hlfntNew;
|
||||
PRECTL lprc;
|
||||
USHORT jBkMode;
|
||||
LONG lBkMode;
|
||||
POINTL ptlViewportOrg;
|
||||
if (!dc) break;
|
||||
pgO = (PGDIBSTEXTOUT) pHdr;
|
||||
|
||||
|
@ -288,6 +289,15 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
|||
flags |= DIRTY_CHARSET;
|
||||
}
|
||||
|
||||
if ( dc->pdcattr->ptlViewportOrg.x != pgO->ptlViewportOrg.x ||
|
||||
dc->pdcattr->ptlViewportOrg.y != pgO->ptlViewportOrg.y )
|
||||
{
|
||||
saveflXform = dc->pdcattr->flXform & (PAGE_XLATE_CHANGED|WORLD_XFORM_CHANGED|DEVICE_TO_WORLD_INVALID);
|
||||
ptlViewportOrg = dc->pdcattr->ptlViewportOrg;
|
||||
dc->pdcattr->ptlViewportOrg = pgO->ptlViewportOrg;
|
||||
flXform = (PAGE_XLATE_CHANGED|WORLD_XFORM_CHANGED|DEVICE_TO_WORLD_INVALID);
|
||||
}
|
||||
|
||||
dc->pdcattr->ulDirty_ |= flags;
|
||||
|
||||
jBkMode = dc->pdcattr->jBkMode;
|
||||
|
@ -312,6 +322,12 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
|||
dc->pdcattr->jBkMode = jBkMode;
|
||||
dc->pdcattr->lBkMode = lBkMode;
|
||||
|
||||
if (saveflXform)
|
||||
{
|
||||
dc->pdcattr->ptlViewportOrg = ptlViewportOrg;
|
||||
dc->pdcattr->flXform |= saveflXform|flXform;
|
||||
}
|
||||
|
||||
if (flags & DIRTY_TEXT && crColor != -1)
|
||||
{
|
||||
dc->pdcattr->crForegroundClr = crColor;
|
||||
|
@ -341,7 +357,8 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
|||
PGDIBSEXTTEXTOUT pgO;
|
||||
COLORREF crBkColor;
|
||||
ULONG ulBackgroundClr;
|
||||
DWORD flags = 0, saveflags;
|
||||
POINTL ptlViewportOrg;
|
||||
DWORD flags = 0, flXform = 0, saveflags, saveflXform = 0;
|
||||
if (!dc) break;
|
||||
pgO = (PGDIBSEXTTEXTOUT) pHdr;
|
||||
|
||||
|
@ -356,6 +373,15 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
|||
flags |= (DIRTY_BACKGROUND|DIRTY_LINE|DIRTY_FILL);
|
||||
}
|
||||
|
||||
if ( dc->pdcattr->ptlViewportOrg.x != pgO->ptlViewportOrg.x ||
|
||||
dc->pdcattr->ptlViewportOrg.y != pgO->ptlViewportOrg.y )
|
||||
{
|
||||
saveflXform = dc->pdcattr->flXform & (PAGE_XLATE_CHANGED|WORLD_XFORM_CHANGED|DEVICE_TO_WORLD_INVALID);
|
||||
ptlViewportOrg = dc->pdcattr->ptlViewportOrg;
|
||||
dc->pdcattr->ptlViewportOrg = pgO->ptlViewportOrg;
|
||||
flXform = (PAGE_XLATE_CHANGED|WORLD_XFORM_CHANGED|DEVICE_TO_WORLD_INVALID);
|
||||
}
|
||||
|
||||
dc->pdcattr->ulDirty_ |= flags;
|
||||
|
||||
IntExtTextOutW( dc,
|
||||
|
@ -368,6 +394,12 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
|||
NULL,
|
||||
0 );
|
||||
|
||||
if (saveflXform)
|
||||
{
|
||||
dc->pdcattr->ptlViewportOrg = ptlViewportOrg;
|
||||
dc->pdcattr->flXform |= saveflXform|flXform;
|
||||
}
|
||||
|
||||
if (flags & DIRTY_BACKGROUND)
|
||||
{
|
||||
dc->pdcattr->crBackgroundClr = crBkColor;
|
||||
|
|
Loading…
Reference in a new issue