2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS System Libraries
4 * FILE: dll/gdi32/objects/coord.c
5 * PURPOSE: Functions for coordinate transformation
10 /* Currently we use a MATRIX inside the DC_ATTR containing the
11 coordinate transformations, while we deal with XFORM structures
12 internally. If we move all coordinate transformation to gdi32,
13 we might as well have an XFORM structure in the DC_ATTR. */
15 MatrixToXForm(XFORM
*pxform
, const MATRIX
*pmx
)
17 XFORML
*pxforml
= (XFORML
*)pxform
;
18 pxforml
->eM11
= FOtoF(&pmx
->efM11
);
19 pxforml
->eM12
= FOtoF(&pmx
->efM12
);
20 pxforml
->eM21
= FOtoF(&pmx
->efM21
);
21 pxforml
->eM22
= FOtoF(&pmx
->efM22
);
22 pxforml
->eDx
= FOtoF(&pmx
->efDx
);
23 pxforml
->eDy
= FOtoF(&pmx
->efDy
);
36 for (i
= 0; i
< nCount
; i
++)
38 x
= pptIn
[i
].x
* pxform
->eM11
+ pptIn
[i
].y
* pxform
->eM12
+ pxform
->eDx
;
39 pptOut
[i
].x
= _lrintf(x
);
40 y
= pptIn
[i
].x
* pxform
->eM21
+ pptIn
[i
].y
* pxform
->eM22
+ pxform
->eDy
;
41 pptOut
[i
].y
= _lrintf(y
);
55 MatrixToXForm(&xform
, pmx
);
56 GdiTransformPoints2(&xform
, pptOut
, pptIn
, nCount
);
59 #define MAX_OFFSET 4294967040.0
71 if (!pxfResult
|| !pxf1
|| !pxf2
) return FALSE
;
73 /* Do matrix multiplication */
74 xformTmp
.eM11
= pxf1
->eM11
* pxf2
->eM11
+ pxf1
->eM12
* pxf2
->eM21
;
75 xformTmp
.eM12
= pxf1
->eM11
* pxf2
->eM12
+ pxf1
->eM12
* pxf2
->eM22
;
76 xformTmp
.eM21
= pxf1
->eM21
* pxf2
->eM11
+ pxf1
->eM22
* pxf2
->eM21
;
77 xformTmp
.eM22
= pxf1
->eM21
* pxf2
->eM12
+ pxf1
->eM22
* pxf2
->eM22
;
78 xformTmp
.eDx
= pxf1
->eDx
* pxf2
->eM11
+ pxf1
->eDy
* pxf2
->eM21
+ pxf2
->eDx
;
79 xformTmp
.eDy
= pxf1
->eDx
* pxf2
->eM12
+ pxf1
->eDy
* pxf2
->eM22
+ pxf2
->eDy
;
81 *pxfResult
= xformTmp
;
83 /* windows compatibility fixups (needs more work) */
84 if (_isnan(xformTmp
.eM12
))
86 if (pxf1
->eM11
== 0 || pxf2
->eM12
== 0) pxfResult
->eM12
= 0.;
89 /* Check for invalid offset ranges */
90 if (xformTmp
.eDx
> MAX_OFFSET
|| xformTmp
.eDx
< -MAX_OFFSET
||
91 xformTmp
.eDy
> MAX_OFFSET
|| xformTmp
.eDy
< -MAX_OFFSET
)
101 DPtoLP(HDC hdc
, LPPOINT lpPoints
, INT nCount
)
107 pdcattr
= GdiGetDcAttr(hdc
);
110 SetLastError(ERROR_INVALID_HANDLE
);
114 if (pdcattr
->flXform
& ANY_XFORM_CHANGES
)
116 GdiFixupTransforms(pdcattr
);
119 // FIXME: can this fail on Windows?
120 GdiTransformPoints(&pdcattr
->mxDeviceToWorld
, lpPoints
, lpPoints
, nCount
);
124 return NtGdiTransformPoints(hdc
, lpPoints
, lpPoints
, nCount
, GdiDpToLp
);
129 LPtoDP(HDC hdc
, LPPOINT lpPoints
, INT nCount
)
135 pdcattr
= GdiGetDcAttr(hdc
);
138 SetLastError(ERROR_INVALID_HANDLE
);
142 if (pdcattr
->flXform
& ANY_XFORM_CHANGES
)
144 GdiFixupTransforms(pdcattr
);
147 // FIXME: can this fail on Windows?
148 GdiTransformPoints(&pdcattr
->mxWorldToDevice
, lpPoints
, lpPoints
, nCount
);
152 return NtGdiTransformPoints(hdc
, lpPoints
, lpPoints
, nCount
, GdiLpToDp
);
161 GetCurrentPositionEx(HDC hdc
,
166 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
170 if ( Dc_Attr
->ulDirty_
& DIRTY_PTLCURRENT
) // have a hit!
172 lpPoint
->x
= Dc_Attr
->ptfxCurrent
.x
;
173 lpPoint
->y
= Dc_Attr
->ptfxCurrent
.y
;
174 DPtoLP ( hdc
, lpPoint
, 1); // reconvert back.
175 Dc_Attr
->ptlCurrent
.x
= lpPoint
->x
; // save it
176 Dc_Attr
->ptlCurrent
.y
= lpPoint
->y
;
177 Dc_Attr
->ulDirty_
&= ~DIRTY_PTLCURRENT
; // clear bit
181 lpPoint
->x
= Dc_Attr
->ptlCurrent
.x
;
182 lpPoint
->y
= Dc_Attr
->ptlCurrent
.y
;
187 SetLastError(ERROR_INVALID_PARAMETER
);
198 GetWorldTransform(HDC hDC
, LPXFORM lpXform
)
203 pdcattr
= GdiGetDcAttr(hdc
);
206 SetLastError(ERROR_INVALID_HANDLE
);
210 if (pdcattr
->flXform
& ANY_XFORM_INVALID
)
212 GdiFixupTransforms(pdcattr
);
215 MatrixToXForm(lpXform
, &pdcattr
->mxWorldToDevice
);
217 return NtGdiGetTransform(hDC
, GdiWorldSpaceToPageSpace
, lpXform
);
223 SetWorldTransform( HDC hDC
, CONST XFORM
*Xform
)
225 /* FIXME shall we add undoc #define MWT_SETXFORM 4 ?? */
226 return ModifyWorldTransform( hDC
, Xform
, MWT_MAX
+1);
232 ModifyWorldTransform(
239 // Handle something other than a normal dc object.
240 if (GDI_HANDLE_GET_TYPE(hDC
) != GDI_OBJECT_TYPE_DC
)
242 if (GDI_HANDLE_GET_TYPE(hDC
) == GDI_OBJECT_TYPE_METADC
)
246 PLDC pLDC
= GdiGetLDC(hDC
);
249 SetLastError(ERROR_INVALID_HANDLE
);
252 if (pLDC
->iType
== LDC_EMFLDC
)
254 if (iMode
== MWT_MAX
+1)
255 if (!EMFDRV_SetWorldTransform( hDC
, Xform
) ) return FALSE
;
256 return EMFDRV_ModifyWorldTransform( hDC
, Xform
, iMode
); // Ported from wine.
264 if (!GdiGetHandleUserData((HGDIOBJ
) hDC
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
266 /* Check that graphics mode is GM_ADVANCED */
267 if ( Dc_Attr
->iGraphicsMode
!= GM_ADVANCED
) return FALSE
;
269 return NtGdiModifyWorldTransform(hDC
, (CONST LPXFORM
) Xform
, iMode
);
281 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
283 if ((Dc_Attr
->flXform
& PAGE_EXTENTS_CHANGED
) && (Dc_Attr
->iMapMode
== MM_ISOTROPIC
))
284 // Something was updated, go to kernel.
285 return NtGdiGetDCPoint( hdc
, GdiGetViewPortExt
, (PPOINTL
) lpSize
);
288 lpSize
->cx
= Dc_Attr
->szlViewportExt
.cx
;
289 lpSize
->cy
= Dc_Attr
->szlViewportExt
.cy
;
304 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
305 lpPoint
->x
= Dc_Attr
->ptlViewportOrg
.x
;
306 lpPoint
->y
= Dc_Attr
->ptlViewportOrg
.y
;
307 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) lpPoint
->x
= -lpPoint
->x
;
309 // return NtGdiGetDCPoint( hdc, GdiGetViewPortOrg, lpPoint );
322 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
323 lpSize
->cx
= Dc_Attr
->szlWindowExt
.cx
;
324 lpSize
->cy
= Dc_Attr
->szlWindowExt
.cy
;
325 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) lpSize
->cx
= -lpSize
->cx
;
327 // return NtGdiGetDCPoint( hdc, GdiGetWindowExt, (LPPOINT) lpSize );
340 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
341 lpPoint
->x
= Dc_Attr
->ptlWindowOrg
.x
;
342 lpPoint
->y
= Dc_Attr
->ptlWindowOrg
.y
;
344 //return NtGdiGetDCPoint( hdc, GdiGetWindowOrg, lpPoint );
352 SetViewportExtEx(HDC hdc
,
359 if (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)
361 if (GDI_HANDLE_GET_TYPE(hdc
) == GDI_OBJECT_TYPE_METADC
)
362 return MFDRV_SetViewportExtEx();
365 PLDC pLDC
= GdiGetLDC(hdc
);
368 SetLastError(ERROR_INVALID_HANDLE
);
371 if (pLDC
->iType
== LDC_EMFLDC
)
373 return EMFDRV_SetViewportExtEx();
378 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
))
385 lpSize
->cx
= Dc_Attr
->szlViewportExt
.cx
;
386 lpSize
->cy
= Dc_Attr
->szlViewportExt
.cy
;
389 if ((Dc_Attr
->szlViewportExt
.cx
== nXExtent
) && (Dc_Attr
->szlViewportExt
.cy
== nYExtent
))
392 if ((Dc_Attr
->iMapMode
== MM_ISOTROPIC
) || (Dc_Attr
->iMapMode
== MM_ANISOTROPIC
))
394 if (NtCurrentTeb()->GdiTebBatch
.HDC
== hdc
)
396 if (Dc_Attr
->ulDirty_
& DC_FONTTEXT_DIRTY
)
398 NtGdiFlush(); // Sync up Dc_Attr from Kernel space.
399 Dc_Attr
->ulDirty_
&= ~(DC_MODE_DIRTY
|DC_FONTTEXT_DIRTY
);
402 Dc_Attr
->szlViewportExt
.cx
= nXExtent
;
403 Dc_Attr
->szlViewportExt
.cy
= nYExtent
;
404 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) NtGdiMirrorWindowOrg(hdc
);
405 Dc_Attr
->flXform
|= (PAGE_EXTENTS_CHANGED
|INVALIDATE_ATTRIBUTES
|DEVICE_TO_WORLD_INVALID
);
415 SetWindowOrgEx(HDC hdc
,
423 if (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)
425 if (GDI_HANDLE_GET_TYPE(hdc
) == GDI_OBJECT_TYPE_METADC
)
426 return MFDRV_SetWindowOrgEx();
429 PLDC pLDC
= GdiGetLDC(hdc
);
432 SetLastError(ERROR_INVALID_HANDLE
);
435 if (pLDC
->iType
== LDC_EMFLDC
)
437 return EMFDRV_SetWindowOrgEx();
442 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
446 lpPoint
->x
= Dc_Attr
->ptlWindowOrg
.x
;
447 lpPoint
->y
= Dc_Attr
->ptlWindowOrg
.y
;
450 if ((Dc_Attr
->ptlWindowOrg
.x
== X
) && (Dc_Attr
->ptlWindowOrg
.y
== Y
))
453 if (NtCurrentTeb()->GdiTebBatch
.HDC
== (ULONG
)hdc
)
455 if (Dc_Attr
->ulDirty_
& DC_FONTTEXT_DIRTY
)
457 NtGdiFlush(); // Sync up Dc_Attr from Kernel space.
458 Dc_Attr
->ulDirty_
&= ~(DC_MODE_DIRTY
|DC_FONTTEXT_DIRTY
);
462 Dc_Attr
->ptlWindowOrg
.x
= X
;
463 Dc_Attr
->lWindowOrgx
= X
;
464 Dc_Attr
->ptlWindowOrg
.y
= Y
;
465 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) NtGdiMirrorWindowOrg(hdc
);
466 Dc_Attr
->flXform
|= (PAGE_XLATE_CHANGED
|DEVICE_TO_WORLD_INVALID
);
469 return NtGdiSetWindowOrgEx(hdc
,X
,Y
,lpPoint
);
477 SetWindowExtEx(HDC hdc
,
484 if (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)
486 if (GDI_HANDLE_GET_TYPE(hdc
) == GDI_OBJECT_TYPE_METADC
)
487 return MFDRV_SetWindowExtEx();
490 PLDC pLDC
= GdiGetLDC(hdc
);
493 SetLastError(ERROR_INVALID_HANDLE
);
496 if (pLDC
->iType
== LDC_EMFLDC
)
498 return EMFDRV_SetWindowExtEx();
503 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
507 lpSize
->cx
= Dc_Attr
->szlWindowExt
.cx
;
508 lpSize
->cy
= Dc_Attr
->szlWindowExt
.cy
;
509 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) lpSize
->cx
= -lpSize
->cx
;
512 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
)
514 NtGdiMirrorWindowOrg(hdc
);
515 Dc_Attr
->flXform
|= (PAGE_EXTENTS_CHANGED
|INVALIDATE_ATTRIBUTES
|DEVICE_TO_WORLD_INVALID
);
517 else if ((Dc_Attr
->iMapMode
== MM_ISOTROPIC
) || (Dc_Attr
->iMapMode
== MM_ANISOTROPIC
))
519 if ((Dc_Attr
->szlWindowExt
.cx
== nXExtent
) && (Dc_Attr
->szlWindowExt
.cy
== nYExtent
))
522 if ((!nXExtent
) || (!nYExtent
)) return FALSE
;
524 if (NtCurrentTeb()->GdiTebBatch
.HDC
== hdc
)
526 if (Dc_Attr
->ulDirty_
& DC_FONTTEXT_DIRTY
)
528 NtGdiFlush(); // Sync up Dc_Attr from Kernel space.
529 Dc_Attr
->ulDirty_
&= ~(DC_MODE_DIRTY
|DC_FONTTEXT_DIRTY
);
532 Dc_Attr
->szlWindowExt
.cx
= nXExtent
;
533 Dc_Attr
->szlWindowExt
.cy
= nYExtent
;
534 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) NtGdiMirrorWindowOrg(hdc
);
535 Dc_Attr
->flXform
|= (PAGE_EXTENTS_CHANGED
|INVALIDATE_ATTRIBUTES
|DEVICE_TO_WORLD_INVALID
);
537 return TRUE
; // Return TRUE.
545 SetViewportOrgEx(HDC hdc
,
553 if (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)
555 if (GDI_HANDLE_GET_TYPE(hdc
) == GDI_OBJECT_TYPE_METADC
)
556 return MFDRV_SetViewportOrgEx();
559 PLDC pLDC
= GdiGetLDC(hdc
);
562 SetLastError(ERROR_INVALID_HANDLE
);
565 if (pLDC
->iType
== LDC_EMFLDC
)
567 return EMFDRV_SetViewportOrgEx();
572 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
576 lpPoint
->x
= Dc_Attr
->ptlViewportOrg
.x
;
577 lpPoint
->y
= Dc_Attr
->ptlViewportOrg
.y
;
578 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) lpPoint
->x
= -lpPoint
->x
;
580 Dc_Attr
->flXform
|= (PAGE_XLATE_CHANGED
|DEVICE_TO_WORLD_INVALID
);
581 if (Dc_Attr
->dwLayout
& LAYOUT_RTL
) X
= -X
;
582 Dc_Attr
->ptlViewportOrg
.x
= X
;
583 Dc_Attr
->ptlViewportOrg
.y
= Y
;
586 return NtGdiSetViewportOrgEx(hdc
,X
,Y
,lpPoint
);
604 if (GDI_HANDLE_GET_TYPE(a0
) != GDI_OBJECT_TYPE_DC
)
606 if (GDI_HANDLE_GET_TYPE(a0
) == GDI_OBJECT_TYPE_METADC
)
610 PLDC pLDC
= GdiGetLDC(a0
);
613 SetLastError(ERROR_INVALID_HANDLE
);
616 if (pLDC
->iType
== LDC_EMFLDC
)
623 if (!GdiIsHandleValid((HGDIOBJ
) a0
) ||
624 (GDI_HANDLE_GET_TYPE(a0
) != GDI_OBJECT_TYPE_DC
)) return FALSE
;
626 return NtGdiScaleViewportExtEx(a0
, a1
, a2
, a3
, a4
, a5
);
644 if (GDI_HANDLE_GET_TYPE(a0
) != GDI_OBJECT_TYPE_DC
)
646 if (GDI_HANDLE_GET_TYPE(a0
) == GDI_OBJECT_TYPE_METADC
)
650 PLDC pLDC
= GdiGetLDC(a0
);
653 SetLastError(ERROR_INVALID_HANDLE
);
656 if (pLDC
->iType
== LDC_EMFLDC
)
663 if (!GdiIsHandleValid((HGDIOBJ
) a0
) ||
664 (GDI_HANDLE_GET_TYPE(a0
) != GDI_OBJECT_TYPE_DC
)) return FALSE
;
666 return NtGdiScaleWindowExtEx(a0
, a1
, a2
, a3
, a4
, a5
);
678 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return GDI_ERROR
;
679 return Dc_Attr
->dwLayout
;
692 if (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)
694 if (GDI_HANDLE_GET_TYPE(hdc
) == GDI_OBJECT_TYPE_METADC
)
695 return MFDRV_SetLayout( hdc
, dwLayout
);
698 PLDC pLDC
= GdiGetLDC(hdc
);
701 SetLastError(ERROR_INVALID_HANDLE
);
704 if (pLDC
->iType
== LDC_EMFLDC
)
706 return EMFDRV_SetLayout( hdc
, dwLayout
);
711 if (!GdiIsHandleValid((HGDIOBJ
) hdc
) ||
712 (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)) return GDI_ERROR
;
713 return NtGdiSetLayout( hdc
, -1, dwLayout
);
721 SetLayoutWidth(HDC hdc
,LONG wox
,DWORD dwLayout
)
723 if (!GdiIsHandleValid((HGDIOBJ
) hdc
) ||
724 (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)) return GDI_ERROR
;
725 return NtGdiSetLayout( hdc
, wox
, dwLayout
);
734 OffsetViewportOrgEx(HDC hdc
,
742 if (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)
744 if (GDI_HANDLE_GET_TYPE(hdc
) == GDI_OBJECT_TYPE_METADC
)
745 return MFDRV_OffsetViewportOrgEx(hdc
, nXOffset
, nYOffset
, lpPoint
);
748 PLDC pLDC
= GdiGetLDC(hdc
);
751 SetLastError(ERROR_INVALID_HANDLE
);
754 if (pLDC
->iType
== LDC_EMFLDC
)
756 return EMFDRV_OffsetWindowOrgEx(hdc
, nXOffset
, nYOffset
, lpPoint
);
761 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
765 *lpPoint
= (POINT
)Dc_Attr
->ptlViewportOrg
;
766 if ( Dc_Attr
->dwLayout
& LAYOUT_RTL
) lpPoint
->x
= -lpPoint
->x
;
769 if ( nXOffset
|| nYOffset
!= nXOffset
)
771 if (NtCurrentTeb()->GdiTebBatch
.HDC
== (ULONG
)hdc
)
773 if (Dc_Attr
->ulDirty_
& DC_MODE_DIRTY
)
776 Dc_Attr
->ulDirty_
&= ~DC_MODE_DIRTY
;
779 Dc_Attr
->flXform
|= (PAGE_XLATE_CHANGED
|DEVICE_TO_WORLD_INVALID
);
780 if ( Dc_Attr
->dwLayout
& LAYOUT_RTL
) nXOffset
= -nXOffset
;
781 Dc_Attr
->ptlViewportOrg
.x
+= nXOffset
;
782 Dc_Attr
->ptlViewportOrg
.y
+= nYOffset
;
786 return NtGdiOffsetViewportOrgEx(hdc
, nXOffset
, nYOffset
, lpPoint
);
795 OffsetWindowOrgEx(HDC hdc
,
803 if (GDI_HANDLE_GET_TYPE(hdc
) != GDI_OBJECT_TYPE_DC
)
805 if (GDI_HANDLE_GET_TYPE(hdc
) == GDI_OBJECT_TYPE_METADC
)
806 return MFDRV_OffsetWindowOrgEx(hdc
, nXOffset
, nYOffset
, lpPoint
);
809 PLDC pLDC
= GdiGetLDC(hdc
);
812 SetLastError(ERROR_INVALID_HANDLE
);
815 if (pLDC
->iType
== LDC_EMFLDC
)
817 return EMFDRV_OffsetWindowOrgEx(hdc
, nXOffset
, nYOffset
, lpPoint
);
822 if (!GdiGetHandleUserData((HGDIOBJ
) hdc
, GDI_OBJECT_TYPE_DC
, (PVOID
) &Dc_Attr
)) return FALSE
;
826 *lpPoint
= (POINT
)Dc_Attr
->ptlWindowOrg
;
827 lpPoint
->x
= Dc_Attr
->lWindowOrgx
;
830 if ( nXOffset
|| nYOffset
!= nXOffset
)
832 if (NtCurrentTeb()->GdiTebBatch
.HDC
== (ULONG
)hdc
)
834 if (Dc_Attr
->ulDirty_
& DC_MODE_DIRTY
)
837 Dc_Attr
->ulDirty_
&= ~DC_MODE_DIRTY
;
840 Dc_Attr
->flXform
|= (PAGE_XLATE_CHANGED
|DEVICE_TO_WORLD_INVALID
);
841 Dc_Attr
->ptlWindowOrg
.x
+= nXOffset
;
842 Dc_Attr
->ptlWindowOrg
.y
+= nYOffset
;
843 Dc_Attr
->lWindowOrgx
+= nXOffset
;
847 return NtGdiOffsetWindowOrgEx(hdc
, nXOffset
, nYOffset
, lpPoint
);