mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +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;
|
PGDIBSTEXTOUT pgO;
|
||||||
COLORREF crColor = -1, crBkColor;
|
COLORREF crColor = -1, crBkColor;
|
||||||
ULONG ulForegroundClr, ulBackgroundClr;
|
ULONG ulForegroundClr, ulBackgroundClr;
|
||||||
DWORD flags = 0, saveflags;
|
DWORD flags = 0, flXform = 0, saveflags, saveflXform = 0;
|
||||||
FLONG flTextAlign = -1;
|
FLONG flTextAlign = -1;
|
||||||
HANDLE hlfntNew;
|
HANDLE hlfntNew;
|
||||||
PRECTL lprc;
|
PRECTL lprc;
|
||||||
USHORT jBkMode;
|
USHORT jBkMode;
|
||||||
LONG lBkMode;
|
LONG lBkMode;
|
||||||
|
POINTL ptlViewportOrg;
|
||||||
if (!dc) break;
|
if (!dc) break;
|
||||||
pgO = (PGDIBSTEXTOUT) pHdr;
|
pgO = (PGDIBSTEXTOUT) pHdr;
|
||||||
|
|
||||||
|
@ -288,6 +289,15 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
||||||
flags |= DIRTY_CHARSET;
|
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;
|
dc->pdcattr->ulDirty_ |= flags;
|
||||||
|
|
||||||
jBkMode = dc->pdcattr->jBkMode;
|
jBkMode = dc->pdcattr->jBkMode;
|
||||||
|
@ -312,6 +322,12 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
||||||
dc->pdcattr->jBkMode = jBkMode;
|
dc->pdcattr->jBkMode = jBkMode;
|
||||||
dc->pdcattr->lBkMode = lBkMode;
|
dc->pdcattr->lBkMode = lBkMode;
|
||||||
|
|
||||||
|
if (saveflXform)
|
||||||
|
{
|
||||||
|
dc->pdcattr->ptlViewportOrg = ptlViewportOrg;
|
||||||
|
dc->pdcattr->flXform |= saveflXform|flXform;
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & DIRTY_TEXT && crColor != -1)
|
if (flags & DIRTY_TEXT && crColor != -1)
|
||||||
{
|
{
|
||||||
dc->pdcattr->crForegroundClr = crColor;
|
dc->pdcattr->crForegroundClr = crColor;
|
||||||
|
@ -341,7 +357,8 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
||||||
PGDIBSEXTTEXTOUT pgO;
|
PGDIBSEXTTEXTOUT pgO;
|
||||||
COLORREF crBkColor;
|
COLORREF crBkColor;
|
||||||
ULONG ulBackgroundClr;
|
ULONG ulBackgroundClr;
|
||||||
DWORD flags = 0, saveflags;
|
POINTL ptlViewportOrg;
|
||||||
|
DWORD flags = 0, flXform = 0, saveflags, saveflXform = 0;
|
||||||
if (!dc) break;
|
if (!dc) break;
|
||||||
pgO = (PGDIBSEXTTEXTOUT) pHdr;
|
pgO = (PGDIBSEXTTEXTOUT) pHdr;
|
||||||
|
|
||||||
|
@ -356,6 +373,15 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
||||||
flags |= (DIRTY_BACKGROUND|DIRTY_LINE|DIRTY_FILL);
|
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;
|
dc->pdcattr->ulDirty_ |= flags;
|
||||||
|
|
||||||
IntExtTextOutW( dc,
|
IntExtTextOutW( dc,
|
||||||
|
@ -368,6 +394,12 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
||||||
NULL,
|
NULL,
|
||||||
0 );
|
0 );
|
||||||
|
|
||||||
|
if (saveflXform)
|
||||||
|
{
|
||||||
|
dc->pdcattr->ptlViewportOrg = ptlViewportOrg;
|
||||||
|
dc->pdcattr->flXform |= saveflXform|flXform;
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & DIRTY_BACKGROUND)
|
if (flags & DIRTY_BACKGROUND)
|
||||||
{
|
{
|
||||||
dc->pdcattr->crBackgroundClr = crBkColor;
|
dc->pdcattr->crBackgroundClr = crBkColor;
|
||||||
|
|
Loading…
Reference in a new issue