diff --git a/reactos/dll/win32/gdi32/objects/coord.c b/reactos/dll/win32/gdi32/objects/coord.c index 70e4f3c9aad..37a69ef3712 100644 --- a/reactos/dll/win32/gdi32/objects/coord.c +++ b/reactos/dll/win32/gdi32/objects/coord.c @@ -194,13 +194,14 @@ ModifyWorldTransform( return FALSE; } } +#endif PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return FALSE; /* Check that graphics mode is GM_ADVANCED */ if ( Dc_Attr->iGraphicsMode != GM_ADVANCED ) return FALSE; -#endif + return NtGdiModifyWorldTransform(hDC, (CONST LPXFORM) Xform, iMode); } diff --git a/reactos/dll/win32/gdi32/objects/dc.c b/reactos/dll/win32/gdi32/objects/dc.c index 8096fed1af3..ec1edc4f100 100644 --- a/reactos/dll/win32/gdi32/objects/dc.c +++ b/reactos/dll/win32/gdi32/objects/dc.c @@ -327,7 +327,6 @@ DeleteObject(HGDIOBJ hObject) case GDI_OBJECT_TYPE_EXTPEN: case GDI_OBJECT_TYPE_PEN: { -#if 0 PBRUSH_ATTR Brh_Attr; PTEB pTeb; @@ -351,7 +350,6 @@ DeleteObject(HGDIOBJ hObject) if (pTeb->GdiBatchCount >= GDI_BatchLimit) NtGdiFlush(); return TRUE; } -#endif break; } case GDI_OBJECT_TYPE_BITMAP: @@ -750,13 +748,10 @@ GetDCBrushColor( HDC hdc ) { -//#if 0 PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return CLR_INVALID; return (COLORREF) Dc_Attr->ulPenClr; -//#endif - return NtUserGetDCBrushColor(hdc); } /* @@ -768,13 +763,10 @@ GetDCPenColor( HDC hdc ) { -//#if 0 PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return CLR_INVALID; return (COLORREF) Dc_Attr->ulPenClr; -//#endif - return NtUserGetDCPenColor(hdc); } /* @@ -787,7 +779,6 @@ SetDCBrushColor( COLORREF crColor ) { -//#if 0 PDC_ATTR Dc_Attr; COLORREF OldColor = CLR_INVALID; @@ -804,8 +795,6 @@ SetDCBrushColor( } } return OldColor; -//#endif - return NtUserSetDCBrushColor(hdc, crColor); } /* @@ -818,7 +807,6 @@ SetDCPenColor( COLORREF crColor ) { -//#if 0 PDC_ATTR Dc_Attr; COLORREF OldColor = CLR_INVALID; @@ -835,8 +823,7 @@ SetDCPenColor( } } return OldColor; -//#endif - return NtUserSetDCPenColor(hdc, crColor); +// return NtUserSetDCPenColor(hdc, crColor); } /* @@ -849,7 +836,6 @@ SetTextColor( COLORREF crColor ) { -#if 0 PDC_ATTR Dc_Attr; COLORREF OldColor = CLR_INVALID; @@ -883,8 +869,7 @@ SetTextColor( Dc_Attr->crForegroundClr = crColor; } return OldColor; -#endif - return NtGdiSetTextColor(hdc, crColor); +// return NtGdiSetTextColor(hdc, crColor); } /* @@ -897,7 +882,6 @@ SetBkColor( COLORREF crColor ) { -#if 0 PDC_ATTR Dc_Attr; COLORREF OldColor = CLR_INVALID; @@ -931,8 +915,7 @@ SetBkColor( Dc_Attr->crBackgroundClr = crColor; } return OldColor; -#endif - return NtGdiSetBkColor(hdc, crColor); +// return NtGdiSetBkColor(hdc, crColor); } /* @@ -1087,22 +1070,18 @@ GetViewportExtEx( LPSIZE lpSize ) { -#if 0 PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE; if ( Dc_Attr->flXform & PAGE_EXTENTS_CHANGED ) // Something was updated, go to kernel. -#endif - return NtGdiGetDCPoint( hdc, GdiGetViewPortExt, (LPPOINT) lpSize ); -#if 0 + return NtGdiGetDCPoint( hdc, GdiGetViewPortExt, (LPPOINT) lpSize ); else { lpSize->cx = Dc_Attr->szlViewportExt.cx; lpSize->cy = Dc_Attr->szlViewportExt.cy; } return TRUE; -#endif } @@ -1113,16 +1092,13 @@ GetViewportOrgEx( LPPOINT lpPoint ) { -#if 0 PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE; lpPoint->x = Dc_Attr->ptlViewportOrg.x; lpPoint->x = Dc_Attr->ptlViewportOrg.x; return TRUE; -#endif - // Do it this way for now. - return NtGdiGetDCPoint( hdc, GdiGetViewPortOrg, lpPoint ); + // return NtGdiGetDCPoint( hdc, GdiGetViewPortOrg, lpPoint ); } @@ -1133,16 +1109,13 @@ GetWindowExtEx( LPSIZE lpSize ) { -#if 0 PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE; lpSize->cx = Dc_Attr->szlWindowExt.cx; lpSize->cy = Dc_Attr->szlWindowExt.cy; return TRUE; -#endif - // Do it this way for now. - return NtGdiGetDCPoint( hdc, GdiGetWindowExt, (LPPOINT) lpSize ); + // return NtGdiGetDCPoint( hdc, GdiGetWindowExt, (LPPOINT) lpSize ); } @@ -1153,16 +1126,13 @@ GetWindowOrgEx( LPPOINT lpPoint ) { -#if 0 PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return FALSE; lpPoint->x = Dc_Attr->ptlWindowOrg.x; lpPoint->x = Dc_Attr->ptlWindowOrg.x; return TRUE; -#endif - // Do it this way for now. - return NtGdiGetDCPoint( hdc, GdiGetWindowOrg, lpPoint ); + //return NtGdiGetDCPoint( hdc, GdiGetWindowOrg, lpPoint ); } /* FIXME: include correct header */ diff --git a/reactos/dll/win32/gdi32/objects/painting.c b/reactos/dll/win32/gdi32/objects/painting.c index 607cb57cd64..72fbffc5dd2 100644 --- a/reactos/dll/win32/gdi32/objects/painting.c +++ b/reactos/dll/win32/gdi32/objects/painting.c @@ -41,8 +41,6 @@ MoveToEx( HDC hDC, INT x, INT y, LPPOINT Point ) { PDC_ATTR Dc_Attr; - if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return FALSE; - if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC) { if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC) @@ -62,6 +60,8 @@ MoveToEx( HDC hDC, INT x, INT y, LPPOINT Point ) } } + if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return FALSE; + if ( Point ) { if ( Dc_Attr->ulDirty_ & DIRTY_PTLCURRENT ) // Double hit! diff --git a/reactos/dll/win32/gdi32/objects/text.c b/reactos/dll/win32/gdi32/objects/text.c index 8c555091b89..b2037c0edad 100644 --- a/reactos/dll/win32/gdi32/objects/text.c +++ b/reactos/dll/win32/gdi32/objects/text.c @@ -70,14 +70,11 @@ GetTextCharacterExtra( HDC hDc ) { -#if 0 PDC_ATTR Dc_Attr; if (!GdiGetHandleUserData((HGDIOBJ) hDc, (PVOID) &Dc_Attr)) return 0; return Dc_Attr->lTextExtra; -#endif - // Do it this way for now. - return GetDCDWord( hDc, GdiGetTextCharExtra, 0); +// return GetDCDWord( hDc, GdiGetTextCharExtra, 0); } @@ -432,7 +429,7 @@ SetTextCharacterExtra( ) { INT cExtra = 0x80000000; -// PDC_ATTR Dc_Attr; + PDC_ATTR Dc_Attr; if (CharExtra == cExtra) { @@ -444,9 +441,10 @@ SetTextCharacterExtra( { return MFDRV_SetTextCharacterExtra( hDC, CharExtra ); // Wine port. } +#endif if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return cExtra; - if (NtCurrentTeb()->GdiTebBatch.HDC == hDC) + if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hDC) { if (Dc_Attr->ulDirty_ & DC_FONTTEXT_DIRTY) { @@ -456,10 +454,8 @@ SetTextCharacterExtra( } cExtra = Dc_Attr->lTextExtra; Dc_Attr->lTextExtra = CharExtra; - return cExrta; -#endif -// Do this for now. - return GetAndSetDCDWord( hDC, GdiGetSetTextCharExtra, CharExtra, 0, 0, 0 ); + return cExtra; +// return GetAndSetDCDWord( hDC, GdiGetSetTextCharExtra, CharExtra, 0, 0, 0 ); }