- Update Get/SetDCBrush/PenColor code.
* Added dcattr sync flags to Set functions.
* if'ed out, does compile.
Painting.c :
- Update LP to DP to LP code.
* Added update flags for Xforms, the best way I understand them.
* if'ed out.
- Moved Fixme line down and above GetDCObject.
svn path=/trunk/; revision=28150
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);
}
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);
}
COLORREF crColor
)
{
+#if 0
+ PDC_ATTR Dc_Attr;
+ COLORREF OldColor = CLR_INVALID;
+
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldColor;
+ else
+ {
+ OldColor = (COLORREF) Dc_Attr->ulBrushClr;
+ Dc_Attr->ulBrushClr = (ULONG) crColor;
+
+ if ( Dc_Attr->crBrushClr != crColor ) // if same, don't force a copy.
+ {
+ Dc_Attr->ulDirty_ |= DIRTY_FILL;
+ Dc_Attr->crBrushClr = crColor;
+ }
+ }
+ return OldColor;
+#endif
return NtUserSetDCBrushColor(hdc, crColor);
}
COLORREF crColor
)
{
+#if 0
+ PDC_ATTR Dc_Attr;
+ COLORREF OldColor = CLR_INVALID;
+
+ if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldColor;
+ else
+ {
+ OldColor = (COLORREF) Dc_Attr->ulPenClr;
+ Dc_Attr->ulPenClr = (ULONG) crColor;
+
+ if ( Dc_Attr->crPenClr != crColor )
+ {
+ Dc_Attr->ulDirty_ |= DIRTY_LINE;
+ Dc_Attr->crPenClr = crColor;
+ }
+ }
+ return OldColor;
+#endif
return NtUserSetDCPenColor(hdc, crColor);
}
__asm fistp out
#endif
-#if 0 /* FIXME: enable this as soon as we have working usermode gdi */
LONG
FASTCALL
EFtoF( EFLOAT_S * efp)
STDCALL
DPtoLP ( HDC hDC, LPPOINT Points, INT Count )
{
+#if 0
INT i;
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return FALSE;
- for ( i = 0; i < Count; i++ )
- CoordCnvP ( &Dc_Attr->mxDevicetoWorld, &Points[i] );
+ if (Dc_Attr->flXform & ( DEVICE_TO_WORLD_INVALID | // Force a full recalibration!
+ PAGE_XLATE_CHANGED | // Changes or Updates have been made,
+ PAGE_EXTENTS_CHANGED | // do processing in kernel space.
+ WORLD_XFORM_CHANGED )
+#endif
+ return NtGdiTransformPoints( hDC, Points, Points, Count, 0); // Last is 0 or 2
+#if 0
+ else
+ {
+ for ( i = 0; i < Count; i++ )
+ CoordCnvP ( &Dc_Attr->mxDevicetoWorld, &Points[i] );
+ }
return TRUE;
+#endif
}
STDCALL
LPtoDP ( HDC hDC, LPPOINT Points, INT Count )
{
+#if 0
INT i;
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return FALSE;
- for ( i = 0; i < Count; i++ )
- CoordCnvP ( &Dc_Attr->mxWorldToDevice, &Points[i] );
+ if (Dc_Attr->flXform & ( PAGE_XLATE_CHANGED | // Check for Changes and Updates
+ PAGE_EXTENTS_CHANGED |
+ WORLD_XFORM_CHANGED )
+#endif
+ return NtGdiTransformPoints( hDC, Points, Points, Count, 0);
+#if 0
+ else
+ {
+ for ( i = 0; i < Count; i++ )
+ CoordCnvP ( &Dc_Attr->mxWorldToDevice, &Points[i] );
+ }
return TRUE;
+#endif
}
+#if 0 /* FIXME: enable this as soon as we have working usermode gdi */
// Will move to dc.c
HGDIOBJ
BOOL WINAPI GetCurrentPositionEx(HDC,LPPOINT);
HCURSOR WINAPI GetCursor(void);
BOOL WINAPI GetDCOrgEx(HDC,LPPOINT);
+#if (_WIN32_WINNT >= 0x0500)
+COLORREF WINAPI GetDCBrushColor(HDC);
+COLORREF WINAPI GetDCPenColor(HDC);
+#endif
int WINAPI GetDeviceCaps(HDC,int);
BOOL WINAPI GetDeviceGammaRamp(HDC,PVOID);
UINT WINAPI GetDIBColorTable(HDC,UINT,UINT,RGBQUAD*);