mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Moved most of the old Win struct to Dc_Attr structure. Tested it with qemu.
svn path=/trunk/; revision=28183
This commit is contained in:
parent
174418b0d1
commit
556e9b7da8
11 changed files with 148 additions and 161 deletions
|
@ -26,9 +26,6 @@ typedef struct _WIN_DC_INFO
|
|||
HRGN hClipRgn; /* Clip region (may be 0) */
|
||||
HRGN hVisRgn; /* Visible region (must never be 0) */
|
||||
HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
||||
HPEN hPen;
|
||||
HBRUSH hBrush;
|
||||
HFONT hFont;
|
||||
HBITMAP hBitmap;
|
||||
HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */
|
||||
|
||||
|
@ -39,19 +36,9 @@ typedef struct _WIN_DC_INFO
|
|||
GdiPath path;
|
||||
/* #endif */
|
||||
|
||||
WORD ROPmode;
|
||||
WORD polyFillMode;
|
||||
WORD stretchBltMode;
|
||||
WORD relAbsMode;
|
||||
WORD backgroundMode;
|
||||
COLORREF backgroundColor;
|
||||
COLORREF textColor;
|
||||
|
||||
short brushOrgX;
|
||||
short brushOrgY;
|
||||
|
||||
WORD textAlign; /* Text alignment from SetTextAlign() */
|
||||
short charExtra; /* Spacing from SetTextCharacterExtra() */
|
||||
short breakTotalExtra; /* Total extra space for justification */
|
||||
short breakCount; /* Break char. count */
|
||||
short breakExtra; /* breakTotalExtra / breakCount */
|
||||
|
@ -60,8 +47,6 @@ typedef struct _WIN_DC_INFO
|
|||
RECT totalExtent;
|
||||
BYTE bitsPerPixel;
|
||||
|
||||
INT MapMode;
|
||||
INT GraphicsMode; /* Graphics mode */
|
||||
INT DCOrgX; /* DC origin */
|
||||
INT DCOrgY;
|
||||
|
||||
|
@ -92,6 +77,8 @@ typedef struct _DC
|
|||
HDC hSelf;
|
||||
HDC hNext;
|
||||
PDC_ATTR pDc_Attr;
|
||||
INT DC_Type;
|
||||
INT DC_Flags;
|
||||
DHPDEV PDev;
|
||||
HSURF FillPatternSurfaces[HS_DDI_MAX];
|
||||
PGDIINFO GDIInfo;
|
||||
|
|
|
@ -140,7 +140,7 @@ NtGdiBitBlt(
|
|||
|
||||
if (UsesPattern)
|
||||
{
|
||||
BrushObj = BRUSHOBJ_LockBrush(DCDest->w.hBrush);
|
||||
BrushObj = BRUSHOBJ_LockBrush(DCDest->Dc_Attr.hbrush);
|
||||
if (NULL == BrushObj)
|
||||
{
|
||||
if (UsesSource && hDCSrc != hDCDest)
|
||||
|
@ -185,11 +185,11 @@ NtGdiBitBlt(
|
|||
{
|
||||
if (DCDest->w.bitsPerPixel == 1)
|
||||
{
|
||||
XlateObj = IntEngCreateMonoXlate(0, DestPalette, SourcePalette, DCSrc->w.backgroundColor);
|
||||
XlateObj = IntEngCreateMonoXlate(0, DestPalette, SourcePalette, DCSrc->Dc_Attr.crBackgroundClr);
|
||||
}
|
||||
else if (DCSrc->w.bitsPerPixel == 1)
|
||||
{
|
||||
XlateObj = IntEngCreateSrcMonoXlate(DestPalette, DCSrc->w.backgroundColor, DCSrc->w.textColor);
|
||||
XlateObj = IntEngCreateSrcMonoXlate(DestPalette, DCSrc->Dc_Attr.crBackgroundClr, DCSrc->Dc_Attr.crForegroundClr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1315,7 +1315,7 @@ NtGdiStretchBlt(
|
|||
|
||||
if (UsesPattern)
|
||||
{
|
||||
BrushObj = BRUSHOBJ_LockBrush(DCDest->w.hBrush);
|
||||
BrushObj = BRUSHOBJ_LockBrush(DCDest->Dc_Attr.hbrush);
|
||||
if (NULL == BrushObj)
|
||||
{
|
||||
if (UsesSource && hDCSrc != hDCDest)
|
||||
|
@ -1481,11 +1481,11 @@ NtGdiAlphaBlend(
|
|||
{
|
||||
if (DCDest->w.bitsPerPixel == 1)
|
||||
{
|
||||
XlateObj = IntEngCreateMonoXlate(0, DestPalette, SourcePalette, DCSrc->w.backgroundColor);
|
||||
XlateObj = IntEngCreateMonoXlate(0, DestPalette, SourcePalette, DCSrc->Dc_Attr.crBackgroundClr);
|
||||
}
|
||||
else if (DCSrc->w.bitsPerPixel == 1)
|
||||
{
|
||||
XlateObj = IntEngCreateSrcMonoXlate(DestPalette, DCSrc->w.backgroundColor, DCSrc->w.textColor);
|
||||
XlateObj = IntEngCreateSrcMonoXlate(DestPalette, DCSrc->Dc_Attr.crBackgroundClr, DCSrc->Dc_Attr.crForegroundClr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -134,7 +134,7 @@ IntGdiCreateBrushXlate(PDC Dc, GDIBRUSHOBJ *BrushObj, BOOLEAN *Failed)
|
|||
if (Pattern->SurfObj.iBitmapFormat == BMF_1BPP)
|
||||
{
|
||||
if (Dc->w.bitsPerPixel != 1)
|
||||
Result = IntEngCreateSrcMonoXlate(Dc->w.hPalette, Dc->w.textColor, Dc->w.backgroundColor);
|
||||
Result = IntEngCreateSrcMonoXlate(Dc->w.hPalette, Dc->Dc_Attr.crForegroundClr, Dc->Dc_Attr.crBackgroundClr);
|
||||
}
|
||||
else if (BrushObj->flAttrs & GDIBRUSH_IS_DIB)
|
||||
{
|
||||
|
@ -823,7 +823,7 @@ NtGdiPatBlt(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||
BrushObj = BRUSHOBJ_LockBrush(dc->Dc_Attr.hbrush);
|
||||
if (BrushObj == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
|
|
|
@ -255,7 +255,7 @@ FASTCALL
|
|||
IntGetGraphicsMode ( PDC dc )
|
||||
{
|
||||
ASSERT ( dc );
|
||||
return dc->w.GraphicsMode;
|
||||
return dc->Dc_Attr.iGraphicsMode;
|
||||
}
|
||||
|
||||
BOOL
|
||||
|
@ -309,7 +309,7 @@ NtGdiGetGraphicsMode ( HDC hDC )
|
|||
return 0;
|
||||
}
|
||||
|
||||
GraphicsMode = dc->w.GraphicsMode;
|
||||
GraphicsMode = dc->Dc_Attr.iGraphicsMode;
|
||||
|
||||
DC_UnlockDc(dc);
|
||||
return GraphicsMode;
|
||||
|
@ -680,8 +680,8 @@ NtGdiSetGraphicsMode(HDC hDC,
|
|||
return 0;
|
||||
}
|
||||
|
||||
ret = dc->w.GraphicsMode;
|
||||
dc->w.GraphicsMode = Mode;
|
||||
ret = dc->Dc_Attr.iGraphicsMode;
|
||||
dc->Dc_Attr.iGraphicsMode = Mode;
|
||||
DC_UnlockDc(dc);
|
||||
return ret;
|
||||
}
|
||||
|
@ -701,11 +701,11 @@ NtGdiSetMapMode(HDC hDC,
|
|||
return 0;
|
||||
}
|
||||
|
||||
PrevMapMode = dc->w.MapMode;
|
||||
PrevMapMode = dc->Dc_Attr.iMapMode;
|
||||
|
||||
if (MapMode != dc->w.MapMode || (MapMode != MM_ISOTROPIC && MapMode != MM_ANISOTROPIC))
|
||||
if (MapMode != dc->Dc_Attr.iMapMode || (MapMode != MM_ISOTROPIC && MapMode != MM_ANISOTROPIC))
|
||||
{
|
||||
dc->w.MapMode = MapMode;
|
||||
dc->Dc_Attr.iMapMode = MapMode;
|
||||
|
||||
switch (MapMode)
|
||||
{
|
||||
|
@ -780,7 +780,7 @@ NtGdiSetViewportExtEx(HDC hDC,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
switch (dc->w.MapMode)
|
||||
switch (dc->Dc_Attr.iMapMode)
|
||||
{
|
||||
case MM_HIENGLISH:
|
||||
case MM_HIMETRIC:
|
||||
|
@ -812,7 +812,7 @@ NtGdiSetViewportExtEx(HDC hDC,
|
|||
dc->vportExtX = XExtent;
|
||||
dc->vportExtY = YExtent;
|
||||
|
||||
if (dc->w.MapMode == MM_ISOTROPIC)
|
||||
if (dc->Dc_Attr.iMapMode == MM_ISOTROPIC)
|
||||
IntFixIsotropicMapping(dc);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
|
@ -903,7 +903,7 @@ NtGdiSetWindowExtEx(HDC hDC,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
switch (dc->w.MapMode)
|
||||
switch (dc->Dc_Attr.iMapMode)
|
||||
{
|
||||
case MM_HIENGLISH:
|
||||
case MM_HIMETRIC:
|
||||
|
@ -1024,7 +1024,7 @@ NtGdiSetWorldTransform(HDC hDC,
|
|||
}
|
||||
|
||||
/* Check that graphics mode is GM_ADVANCED */
|
||||
if ( dc->w.GraphicsMode != GM_ADVANCED )
|
||||
if ( dc->Dc_Attr.iGraphicsMode != GM_ADVANCED )
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
return FALSE;
|
||||
|
|
|
@ -244,11 +244,11 @@ NtGdiCreateCompatibleDC(HDC hDC)
|
|||
|
||||
NewDC->PalIndexed = OrigDC->PalIndexed;
|
||||
NewDC->w.hPalette = OrigDC->w.hPalette;
|
||||
NewDC->w.textColor = OrigDC->w.textColor;
|
||||
NewDC->w.textAlign = OrigDC->w.textAlign;
|
||||
NewDC->w.backgroundColor = OrigDC->w.backgroundColor;
|
||||
NewDC->w.backgroundMode = OrigDC->w.backgroundMode;
|
||||
NewDC->w.ROPmode = OrigDC->w.ROPmode;
|
||||
NewDC->Dc_Attr.crForegroundClr = OrigDC->Dc_Attr.crForegroundClr;
|
||||
NewDC->Dc_Attr.lTextAlign = OrigDC->Dc_Attr.lTextAlign;
|
||||
NewDC->Dc_Attr.crBackgroundClr = OrigDC->Dc_Attr.crBackgroundClr;
|
||||
NewDC->Dc_Attr.jBkMode = OrigDC->Dc_Attr.jBkMode;
|
||||
NewDC->Dc_Attr.jROP2 = OrigDC->Dc_Attr.jROP2;
|
||||
DC_UnlockDc(NewDC);
|
||||
DC_UnlockDc(OrigDC);
|
||||
if (NULL != DisplayDC)
|
||||
|
@ -908,7 +908,7 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
|||
{
|
||||
NewDC->PalIndexed = NtGdiGetStockObject(DEFAULT_PALETTE);
|
||||
NewDC->w.hPalette = NewDC->DevInfo->hpalDefault;
|
||||
NewDC->w.ROPmode = R2_COPYPEN;
|
||||
NewDC->Dc_Attr.jROP2 = R2_COPYPEN;
|
||||
|
||||
DC_UnlockDc( NewDC );
|
||||
|
||||
|
@ -1098,8 +1098,8 @@ NtGdiEnumObjects(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DC_GET_VAL( COLORREF, NtGdiGetBkColor, w.backgroundColor )
|
||||
DC_GET_VAL( INT, NtGdiGetBkMode, w.backgroundMode )
|
||||
DC_GET_VAL( COLORREF, NtGdiGetBkColor, Dc_Attr.crBackgroundClr )
|
||||
DC_GET_VAL( INT, NtGdiGetBkMode, Dc_Attr.jBkMode )
|
||||
DC_GET_VAL_EX( GetBrushOrgEx, w.brushOrgX, w.brushOrgY, POINT, x, y )
|
||||
DC_GET_VAL( HRGN, NtGdiGetClipRgn, w.hClipRgn )
|
||||
|
||||
|
@ -1122,16 +1122,16 @@ NtGdiGetCurrentObject(HDC hDC, UINT ObjectType)
|
|||
{
|
||||
case OBJ_PEN:
|
||||
case OBJ_EXTPEN:
|
||||
SelObject = dc->w.hPen;
|
||||
SelObject = dc->Dc_Attr.hpen;
|
||||
break;
|
||||
case OBJ_BRUSH:
|
||||
SelObject = dc->w.hBrush;
|
||||
SelObject = dc->Dc_Attr.hbrush;
|
||||
break;
|
||||
case OBJ_PAL:
|
||||
SelObject = dc->w.hPalette;
|
||||
break;
|
||||
case OBJ_FONT:
|
||||
SelObject = dc->w.hFont;
|
||||
SelObject = dc->Dc_Attr.hlfntNew;
|
||||
break;
|
||||
case OBJ_BITMAP:
|
||||
SelObject = dc->w.hBitmap;
|
||||
|
@ -1221,9 +1221,9 @@ NtGdiSetBkColor(HDC hDC, COLORREF color)
|
|||
return CLR_INVALID;
|
||||
}
|
||||
|
||||
oldColor = dc->w.backgroundColor;
|
||||
dc->w.backgroundColor = color;
|
||||
hBrush = dc->w.hBrush;
|
||||
oldColor = dc->Dc_Attr.crBackgroundClr;
|
||||
dc->Dc_Attr.crBackgroundClr = color;
|
||||
hBrush = dc->Dc_Attr.hbrush;
|
||||
DC_UnlockDc(dc);
|
||||
NtGdiSelectObject(hDC, hBrush);
|
||||
return oldColor;
|
||||
|
@ -1253,9 +1253,9 @@ IntGdiGetDCState(HDC hDC)
|
|||
ASSERT( newdc );
|
||||
|
||||
newdc->w.flags = dc->w.flags | DC_SAVED;
|
||||
newdc->w.hPen = dc->w.hPen;
|
||||
newdc->w.hBrush = dc->w.hBrush;
|
||||
newdc->w.hFont = dc->w.hFont;
|
||||
newdc->Dc_Attr.hpen = dc->Dc_Attr.hpen;
|
||||
newdc->Dc_Attr.hbrush = dc->Dc_Attr.hbrush;
|
||||
newdc->Dc_Attr.hlfntNew = dc->Dc_Attr.hlfntNew;
|
||||
newdc->w.hBitmap = dc->w.hBitmap;
|
||||
newdc->w.hFirstBitmap = dc->w.hFirstBitmap;
|
||||
#if 0
|
||||
|
@ -1265,23 +1265,23 @@ IntGdiGetDCState(HDC hDC)
|
|||
newdc->w.hPalette = dc->w.hPalette;
|
||||
newdc->w.totalExtent = dc->w.totalExtent;
|
||||
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
|
||||
newdc->w.ROPmode = dc->w.ROPmode;
|
||||
newdc->w.polyFillMode = dc->w.polyFillMode;
|
||||
newdc->w.stretchBltMode = dc->w.stretchBltMode;
|
||||
newdc->w.relAbsMode = dc->w.relAbsMode;
|
||||
newdc->w.backgroundMode = dc->w.backgroundMode;
|
||||
newdc->w.backgroundColor = dc->w.backgroundColor;
|
||||
newdc->w.textColor = dc->w.textColor;
|
||||
newdc->Dc_Attr.jROP2 = dc->Dc_Attr.jROP2;
|
||||
newdc->Dc_Attr.jFillMode = dc->Dc_Attr.jFillMode;
|
||||
newdc->Dc_Attr.jStretchBltMode = dc->Dc_Attr.jStretchBltMode;
|
||||
newdc->Dc_Attr.lRelAbs = dc->Dc_Attr.lRelAbs;
|
||||
newdc->Dc_Attr.jBkMode = dc->Dc_Attr.jBkMode;
|
||||
newdc->Dc_Attr.crBackgroundClr = dc->Dc_Attr.crBackgroundClr;
|
||||
newdc->Dc_Attr.crForegroundClr = dc->Dc_Attr.crForegroundClr;
|
||||
newdc->w.brushOrgX = dc->w.brushOrgX;
|
||||
newdc->w.brushOrgY = dc->w.brushOrgY;
|
||||
newdc->w.textAlign = dc->w.textAlign;
|
||||
newdc->w.charExtra = dc->w.charExtra;
|
||||
newdc->Dc_Attr.lTextAlign = dc->Dc_Attr.lTextAlign;
|
||||
newdc->Dc_Attr.lTextExtra = dc->Dc_Attr.lTextExtra;
|
||||
newdc->w.breakTotalExtra = dc->w.breakTotalExtra;
|
||||
newdc->w.breakCount = dc->w.breakCount;
|
||||
newdc->w.breakExtra = dc->w.breakExtra;
|
||||
newdc->w.breakRem = dc->w.breakRem;
|
||||
newdc->w.MapMode = dc->w.MapMode;
|
||||
newdc->w.GraphicsMode = dc->w.GraphicsMode;
|
||||
newdc->Dc_Attr.iMapMode = dc->Dc_Attr.iMapMode;
|
||||
newdc->Dc_Attr.iGraphicsMode = dc->Dc_Attr.iGraphicsMode;
|
||||
#if 0
|
||||
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
||||
newdc->w.DCOrgX = dc->w.DCOrgX;
|
||||
|
@ -1348,23 +1348,23 @@ IntGdiSetDCState ( HDC hDC, HDC hDCSave )
|
|||
#endif
|
||||
|
||||
dc->w.totalExtent = dcs->w.totalExtent;
|
||||
dc->w.ROPmode = dcs->w.ROPmode;
|
||||
dc->w.polyFillMode = dcs->w.polyFillMode;
|
||||
dc->w.stretchBltMode = dcs->w.stretchBltMode;
|
||||
dc->w.relAbsMode = dcs->w.relAbsMode;
|
||||
dc->w.backgroundMode = dcs->w.backgroundMode;
|
||||
dc->w.backgroundColor = dcs->w.backgroundColor;
|
||||
dc->w.textColor = dcs->w.textColor;
|
||||
dc->Dc_Attr.jROP2 = dcs->Dc_Attr.jROP2;
|
||||
dc->Dc_Attr.jFillMode = dcs->Dc_Attr.jFillMode;
|
||||
dc->Dc_Attr.jStretchBltMode = dcs->Dc_Attr.jStretchBltMode;
|
||||
dc->Dc_Attr.lRelAbs = dcs->Dc_Attr.lRelAbs;
|
||||
dc->Dc_Attr.jBkMode = dcs->Dc_Attr.jBkMode;
|
||||
dc->Dc_Attr.crBackgroundClr = dcs->Dc_Attr.crBackgroundClr;
|
||||
dc->Dc_Attr.crForegroundClr = dcs->Dc_Attr.crForegroundClr;
|
||||
dc->w.brushOrgX = dcs->w.brushOrgX;
|
||||
dc->w.brushOrgY = dcs->w.brushOrgY;
|
||||
dc->w.textAlign = dcs->w.textAlign;
|
||||
dc->w.charExtra = dcs->w.charExtra;
|
||||
dc->Dc_Attr.lTextAlign = dcs->Dc_Attr.lTextAlign;
|
||||
dc->Dc_Attr.lTextExtra = dcs->Dc_Attr.lTextExtra;
|
||||
dc->w.breakTotalExtra = dcs->w.breakTotalExtra;
|
||||
dc->w.breakCount = dcs->w.breakCount;
|
||||
dc->w.breakExtra = dcs->w.breakExtra;
|
||||
dc->w.breakRem = dcs->w.breakRem;
|
||||
dc->w.MapMode = dcs->w.MapMode;
|
||||
dc->w.GraphicsMode = dcs->w.GraphicsMode;
|
||||
dc->Dc_Attr.iMapMode = dcs->Dc_Attr.iMapMode;
|
||||
dc->Dc_Attr.iGraphicsMode = dcs->Dc_Attr.iGraphicsMode;
|
||||
#if 0
|
||||
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
||||
dc->w.DCOrgX = dcs->w.DCOrgX;
|
||||
|
@ -1424,11 +1424,11 @@ IntGdiSetDCState ( HDC hDC, HDC hDCSave )
|
|||
#endif
|
||||
|
||||
NtGdiSelectObject( hDC, dcs->w.hBitmap );
|
||||
NtGdiSelectObject( hDC, dcs->w.hBrush );
|
||||
NtGdiSelectObject( hDC, dcs->w.hFont );
|
||||
NtGdiSelectObject( hDC, dcs->w.hPen );
|
||||
NtGdiSetBkColor( hDC, dcs->w.backgroundColor);
|
||||
NtGdiSetTextColor( hDC, dcs->w.textColor);
|
||||
NtGdiSelectObject( hDC, dcs->Dc_Attr.hbrush );
|
||||
NtGdiSelectObject( hDC, dcs->Dc_Attr.hlfntNew );
|
||||
NtGdiSelectObject( hDC, dcs->Dc_Attr.hpen );
|
||||
NtGdiSetBkColor( hDC, dcs->Dc_Attr.crBackgroundClr);
|
||||
NtGdiSetTextColor( hDC, dcs->Dc_Attr.crForegroundClr);
|
||||
|
||||
NtGdiSelectPalette( hDC, dcs->w.hPalette, FALSE );
|
||||
|
||||
|
@ -1665,8 +1665,8 @@ NtGdiGetDeviceCaps(HDC hDC,
|
|||
return ret;
|
||||
}
|
||||
|
||||
DC_GET_VAL( INT, NtGdiGetMapMode, w.MapMode )
|
||||
DC_GET_VAL( INT, NtGdiGetPolyFillMode, w.polyFillMode )
|
||||
DC_GET_VAL( INT, NtGdiGetMapMode, Dc_Attr.iMapMode )
|
||||
DC_GET_VAL( INT, NtGdiGetPolyFillMode, Dc_Attr.jFillMode )
|
||||
|
||||
INT
|
||||
FASTCALL
|
||||
|
@ -1773,11 +1773,11 @@ NtGdiExtGetObjectW(IN HANDLE hGdiObj,
|
|||
return iRetCount;
|
||||
}
|
||||
|
||||
DC_GET_VAL( INT, NtGdiGetRelAbs, w.relAbsMode )
|
||||
DC_GET_VAL( INT, NtGdiGetROP2, w.ROPmode )
|
||||
DC_GET_VAL( INT, NtGdiGetStretchBltMode, w.stretchBltMode )
|
||||
DC_GET_VAL( UINT, NtGdiGetTextAlign, w.textAlign )
|
||||
DC_GET_VAL( COLORREF, NtGdiGetTextColor, w.textColor )
|
||||
DC_GET_VAL( INT, NtGdiGetRelAbs, Dc_Attr.lRelAbs )
|
||||
DC_GET_VAL( INT, NtGdiGetROP2, Dc_Attr.jROP2 )
|
||||
DC_GET_VAL( INT, NtGdiGetStretchBltMode, Dc_Attr.jStretchBltMode )
|
||||
DC_GET_VAL( UINT, NtGdiGetTextAlign, Dc_Attr.lTextAlign )
|
||||
DC_GET_VAL( COLORREF, NtGdiGetTextColor, Dc_Attr.crForegroundClr )
|
||||
DC_GET_VAL_EX( GetViewportExtEx, vportExtX, vportExtY, SIZE, cx, cy )
|
||||
DC_GET_VAL_EX( GetViewportOrgEx, vportOrgX, vportOrgY, POINT, x, y )
|
||||
DC_GET_VAL_EX( GetWindowExtEx, wndExtX, wndExtY, SIZE, cx, cy )
|
||||
|
@ -1968,8 +1968,8 @@ NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj)
|
|||
break;
|
||||
}
|
||||
|
||||
objOrg = (HGDIOBJ)dc->w.hPen;
|
||||
dc->w.hPen = hGDIObj;
|
||||
objOrg = (HGDIOBJ)dc->Dc_Attr.hpen;
|
||||
dc->Dc_Attr.hpen = hGDIObj;
|
||||
if (dc->XlatePen != NULL)
|
||||
EngDeleteXlate(dc->XlatePen);
|
||||
dc->XlatePen = XlateObj;
|
||||
|
@ -1991,8 +1991,8 @@ NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj)
|
|||
break;
|
||||
}
|
||||
|
||||
objOrg = (HGDIOBJ)dc->w.hBrush;
|
||||
dc->w.hBrush = hGDIObj;
|
||||
objOrg = (HGDIOBJ)dc->Dc_Attr.hbrush;
|
||||
dc->Dc_Attr.hbrush = hGDIObj;
|
||||
if (dc->XlateBrush != NULL)
|
||||
EngDeleteXlate(dc->XlateBrush);
|
||||
dc->XlateBrush = XlateObj;
|
||||
|
@ -2001,8 +2001,8 @@ NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj)
|
|||
case GDI_OBJECT_TYPE_FONT:
|
||||
if(NT_SUCCESS(TextIntRealizeFont((HFONT)hGDIObj)))
|
||||
{
|
||||
objOrg = (HGDIOBJ)dc->w.hFont;
|
||||
dc->w.hFont = (HFONT) hGDIObj;
|
||||
objOrg = (HGDIOBJ)dc->Dc_Attr.hlfntNew;
|
||||
dc->Dc_Attr.hlfntNew = (HFONT) hGDIObj;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2038,8 +2038,8 @@ NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj)
|
|||
}
|
||||
|
||||
/* Reselect brush and pen to regenerate the XLATEOBJs. */
|
||||
NtGdiSelectObject ( hDC, dc->w.hBrush );
|
||||
NtGdiSelectObject ( hDC, dc->w.hPen );
|
||||
NtGdiSelectObject ( hDC, dc->Dc_Attr.hbrush );
|
||||
NtGdiSelectObject ( hDC, dc->Dc_Attr.hpen );
|
||||
|
||||
DC_UnlockDc ( dc );
|
||||
hVisRgn = NtGdiCreateRectRgn ( 0, 0, pb->SurfObj.sizlBitmap.cx, pb->SurfObj.sizlBitmap.cy );
|
||||
|
@ -2099,11 +2099,11 @@ IntGdiSetHookFlags(HDC hDC, WORD Flags)
|
|||
return wRet;
|
||||
}
|
||||
|
||||
DC_SET_MODE( NtGdiSetBkMode, w.backgroundMode, TRANSPARENT, OPAQUE )
|
||||
DC_SET_MODE( NtGdiSetPolyFillMode, w.polyFillMode, ALTERNATE, WINDING )
|
||||
// DC_SET_MODE( NtGdiSetRelAbs, w.relAbsMode, ABSOLUTE, RELATIVE )
|
||||
DC_SET_MODE( NtGdiSetROP2, w.ROPmode, R2_BLACK, R2_WHITE )
|
||||
DC_SET_MODE( NtGdiSetStretchBltMode, w.stretchBltMode, BLACKONWHITE, HALFTONE )
|
||||
DC_SET_MODE( NtGdiSetBkMode, Dc_Attr.jBkMode, TRANSPARENT, OPAQUE )
|
||||
DC_SET_MODE( NtGdiSetPolyFillMode, Dc_Attr.jFillMode, ALTERNATE, WINDING )
|
||||
// DC_SET_MODE( NtGdiSetRelAbs, Dc_Attr.lRelAbs, ABSOLUTE, RELATIVE )
|
||||
DC_SET_MODE( NtGdiSetROP2, Dc_Attr.jROP2, R2_BLACK, R2_WHITE )
|
||||
DC_SET_MODE( NtGdiSetStretchBltMode, Dc_Attr.jStretchBltMode, BLACKONWHITE, HALFTONE )
|
||||
|
||||
// ---------------------------------------------------- Private Interface
|
||||
|
||||
|
@ -2202,7 +2202,7 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
|||
NewDC->w.vport2WorldValid = TRUE;
|
||||
// DC_Attr->flXform = DEVICE_TO_PAGE_INVALID; // More research.
|
||||
|
||||
NewDC->w.MapMode = MM_TEXT;
|
||||
NewDC->Dc_Attr.iMapMode = MM_TEXT;
|
||||
// DC_Attr->iMapMode = MM_TEXT;
|
||||
|
||||
NewDC->wndExtX = 1.0f;
|
||||
|
@ -2210,16 +2210,16 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
|||
NewDC->vportExtX = 1.0f;
|
||||
NewDC->vportExtY = 1.0f;
|
||||
|
||||
NewDC->w.textColor = 0;
|
||||
NewDC->Dc_Attr.crForegroundClr = 0;
|
||||
// NewDC->pDc_Attr->ulForegroundClr = 0; // Already Zero
|
||||
// NewDC->pDc_Attr->crForegroundClr = 0;
|
||||
|
||||
NewDC->w.backgroundColor = 0xffffff;
|
||||
NewDC->Dc_Attr.crBackgroundClr = 0xffffff;
|
||||
// DC_Attr->ulBackgroundClr = 0xffffff;
|
||||
// DC_Attr->crBackgroundClr = 0xffffff;
|
||||
|
||||
NewDC->w.hFont = NtGdiGetStockObject(SYSTEM_FONT);
|
||||
TextIntRealizeFont(NewDC->w.hFont);
|
||||
NewDC->Dc_Attr.hlfntNew = NtGdiGetStockObject(SYSTEM_FONT);
|
||||
TextIntRealizeFont(NewDC->Dc_Attr.hlfntNew);
|
||||
// DC_Attr->hlfntNew = NtGdiGetStockObject(SYSTEM_FONT);
|
||||
|
||||
NewDC->w.hPalette = NtGdiGetStockObject(DEFAULT_PALETTE);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
&BrushInst.BrushObject, \
|
||||
x, y, (x)+1, y, \
|
||||
&RectBounds, \
|
||||
ROP2_TO_MIX(dc->w.ROPmode));
|
||||
ROP2_TO_MIX(dc->Dc_Attr.jROP2));
|
||||
|
||||
#define PUTLINE(x1,y1,x2,y2,BrushInst) \
|
||||
ret = ret && IntEngLineTo(&BitmapObj->SurfObj, \
|
||||
|
@ -39,7 +39,7 @@
|
|||
&BrushInst.BrushObject, \
|
||||
x1, y1, x2, y2, \
|
||||
&RectBounds, \
|
||||
ROP2_TO_MIX(dc->w.ROPmode));
|
||||
ROP2_TO_MIX(dc->Dc_Attr.jROP2));
|
||||
|
||||
BOOL FASTCALL
|
||||
IntGdiPolygon(PDC dc,
|
||||
|
@ -91,16 +91,16 @@ IntGdiPolygon(PDC dc,
|
|||
}
|
||||
|
||||
/* Now fill the polygon with the current brush. */
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->Dc_Attr.hbrush);
|
||||
if (FillBrushObj && !(FillBrushObj->flAttrs & GDIBRUSH_IS_NULL))
|
||||
{
|
||||
IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush);
|
||||
ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, ROP2_TO_MIX(dc->w.ROPmode), UnsafePoints, Count, DestRect );
|
||||
ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, ROP2_TO_MIX(dc->Dc_Attr.jROP2), UnsafePoints, Count, DestRect );
|
||||
}
|
||||
BRUSHOBJ_UnlockBrush(FillBrushObj);
|
||||
|
||||
/* get BRUSHOBJ from current pen. */
|
||||
PenBrushObj = PENOBJ_LockPen(dc->w.hPen);
|
||||
PenBrushObj = PENOBJ_LockPen(dc->Dc_Attr.hpen);
|
||||
// Draw the Polygon Edges with the current pen ( if not a NULL pen )
|
||||
if (PenBrushObj && !(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ IntGdiPolygon(PDC dc,
|
|||
UnsafePoints[1].x, /* To */
|
||||
UnsafePoints[1].y,
|
||||
&DestRect,
|
||||
ROP2_TO_MIX(dc->w.ROPmode)); /* MIX */
|
||||
ROP2_TO_MIX(dc->Dc_Attr.jROP2)); /* MIX */
|
||||
if(!ret) break;
|
||||
UnsafePoints++;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ NtGdiEllipse(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
FillBrush = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||
FillBrush = BRUSHOBJ_LockBrush(dc->Dc_Attr.hbrush);
|
||||
if (NULL == FillBrush)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
|
@ -221,7 +221,7 @@ NtGdiEllipse(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
PenBrush = PENOBJ_LockPen(dc->w.hPen);
|
||||
PenBrush = PENOBJ_LockPen(dc->Dc_Attr.hpen);
|
||||
if (NULL == PenBrush)
|
||||
{
|
||||
BRUSHOBJ_UnlockBrush(FillBrush);
|
||||
|
@ -648,7 +648,7 @@ NtGdiPie(HDC hDC,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->Dc_Attr.hbrush);
|
||||
if (NULL == FillBrushObj)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
|
@ -671,7 +671,7 @@ NtGdiPie(HDC hDC,
|
|||
RectBounds.bottom = Bottom;
|
||||
|
||||
SurfObj = (SURFOBJ*) AccessUserObject((ULONG)dc->Surface);
|
||||
HPenToBrushObj(&PenBrushObj, dc->w.hPen);
|
||||
HPenToBrushObj(&PenBrushObj, dc->Dc_Attr.hpen);
|
||||
|
||||
/* Number of points for the circle is 4 * sqrt(2) * Radius, start
|
||||
and end line have at most Radius points, so allocate at least
|
||||
|
@ -1030,7 +1030,7 @@ IntRectangle(PDC dc,
|
|||
DestRect.top = TopRect;
|
||||
DestRect.bottom = BottomRect;
|
||||
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->Dc_Attr.hbrush);
|
||||
|
||||
if ( FillBrushObj )
|
||||
{
|
||||
|
@ -1054,7 +1054,7 @@ IntRectangle(PDC dc,
|
|||
BRUSHOBJ_UnlockBrush(FillBrushObj);
|
||||
|
||||
/* get BRUSHOBJ from current pen. */
|
||||
PenBrushObj = PENOBJ_LockPen(dc->w.hPen);
|
||||
PenBrushObj = PENOBJ_LockPen(dc->Dc_Attr.hpen);
|
||||
if (PenBrushObj == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
|
@ -1070,7 +1070,7 @@ IntRectangle(PDC dc,
|
|||
|
||||
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
|
||||
{
|
||||
Mix = ROP2_TO_MIX(dc->w.ROPmode);
|
||||
Mix = ROP2_TO_MIX(dc->Dc_Attr.jROP2);
|
||||
ret = ret && IntEngLineTo(&BitmapObj->SurfObj,
|
||||
dc->CombinedClip,
|
||||
&PenBrushInst.BrushObject,
|
||||
|
@ -1195,7 +1195,7 @@ IntRoundRect(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->Dc_Attr.hbrush);
|
||||
if (FillBrushObj)
|
||||
{
|
||||
if (FillBrushObj->flAttrs & GDIBRUSH_IS_NULL)
|
||||
|
@ -1210,7 +1210,7 @@ IntRoundRect(
|
|||
}
|
||||
}
|
||||
|
||||
PenBrushObj = PENOBJ_LockPen(dc->w.hPen);
|
||||
PenBrushObj = PENOBJ_LockPen(dc->Dc_Attr.hpen);
|
||||
if (PenBrushObj)
|
||||
{
|
||||
if (PenBrushObj->flAttrs & GDIBRUSH_IS_NULL)
|
||||
|
|
|
@ -100,7 +100,7 @@ IntGdiLineTo(DC *dc,
|
|||
Bounds.bottom = max(Points[0].y, Points[1].y);
|
||||
|
||||
/* get BRUSHOBJ from current pen. */
|
||||
PenBrushObj = PENOBJ_LockPen( dc->w.hPen );
|
||||
PenBrushObj = PENOBJ_LockPen( dc->Dc_Attr.hpen );
|
||||
/* FIXME - PenBrushObj can be NULL!!!! Don't assert here! */
|
||||
ASSERT(PenBrushObj);
|
||||
|
||||
|
@ -113,7 +113,7 @@ IntGdiLineTo(DC *dc,
|
|||
Points[0].x, Points[0].y,
|
||||
Points[1].x, Points[1].y,
|
||||
&Bounds,
|
||||
ROP2_TO_MIX(dc->w.ROPmode));
|
||||
ROP2_TO_MIX(dc->Dc_Attr.jROP2));
|
||||
}
|
||||
|
||||
BITMAPOBJ_UnlockBitmap ( BitmapObj );
|
||||
|
@ -204,7 +204,7 @@ IntGdiPolyline(DC *dc,
|
|||
return PATH_Polyline(dc, pt, Count);
|
||||
|
||||
/* Get BRUSHOBJ from current pen. */
|
||||
PenBrushObj = PENOBJ_LockPen(dc->w.hPen);
|
||||
PenBrushObj = PENOBJ_LockPen(dc->Dc_Attr.hpen);
|
||||
/* FIXME - PenBrushObj can be NULL! Don't assert here! */
|
||||
ASSERT(PenBrushObj);
|
||||
|
||||
|
@ -230,7 +230,7 @@ IntGdiPolyline(DC *dc,
|
|||
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen);
|
||||
Ret = IntEngPolyline(&BitmapObj->SurfObj, dc->CombinedClip,
|
||||
&PenBrushInst.BrushObject, Points, Count,
|
||||
ROP2_TO_MIX(dc->w.ROPmode));
|
||||
ROP2_TO_MIX(dc->Dc_Attr.jROP2));
|
||||
|
||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||
EngFreeMem(Points);
|
||||
|
|
|
@ -284,7 +284,7 @@ NtGdiPathToRegion(HDC hDC)
|
|||
else
|
||||
{
|
||||
/* FIXME: Should we empty the path even if conversion failed? */
|
||||
if(PATH_PathToRegion(pPath, pDc->w.polyFillMode, &hrgnRval))
|
||||
if(PATH_PathToRegion(pPath, pDc->Dc_Attr.jFillMode, &hrgnRval))
|
||||
PATH_EmptyPath(pPath);
|
||||
}
|
||||
|
||||
|
@ -364,7 +364,7 @@ BOOL STDCALL NtGdiSelectClipPath(HDC hDC,
|
|||
return FALSE;
|
||||
}
|
||||
/* Construct a region from the path */
|
||||
else if( PATH_PathToRegion( &dc->w.path, dc->w.polyFillMode, &hrgnPath ) )
|
||||
else if( PATH_PathToRegion( &dc->w.path, dc->Dc_Attr.jFillMode, &hrgnPath ) )
|
||||
{
|
||||
success = IntGdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR;
|
||||
NtGdiDeleteObject( hrgnPath );
|
||||
|
@ -404,7 +404,7 @@ PATH_FillPath( PDC dc, GdiPath *pPath )
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if( PATH_PathToRegion( pPath, dc->w.polyFillMode, &hrgn ))
|
||||
if( PATH_PathToRegion( pPath, dc->Dc_Attr.jFillMode, &hrgn ))
|
||||
{
|
||||
/* Since PaintRgn interprets the region as being in logical coordinates
|
||||
* but the points we store for the path are already in device
|
||||
|
@ -1115,7 +1115,7 @@ BOOL PATH_CheckCorners(DC *dc, POINT corners[], INT x1, INT y1, INT x2, INT y2)
|
|||
}
|
||||
|
||||
/* In GM_COMPATIBLE, don't include bottom and right edges */
|
||||
if(dc->w.GraphicsMode==GM_COMPATIBLE)
|
||||
if(dc->Dc_Attr.iGraphicsMode==GM_COMPATIBLE)
|
||||
{
|
||||
corners[1].x--;
|
||||
corners[1].y--;
|
||||
|
@ -1478,7 +1478,7 @@ BOOL FASTCALL PATH_StrokePath(DC *dc, GdiPath *pPath)
|
|||
return FALSE;
|
||||
|
||||
/* Save the mapping mode info */
|
||||
mapMode=dc->w.MapMode;
|
||||
mapMode=dc->Dc_Attr.iMapMode;
|
||||
IntGetViewportExtEx(dc, &szViewportExt);
|
||||
IntGetViewportOrgEx(dc, &ptViewportOrg);
|
||||
IntGetWindowExtEx(dc, &szWindowExt);
|
||||
|
@ -1486,15 +1486,15 @@ BOOL FASTCALL PATH_StrokePath(DC *dc, GdiPath *pPath)
|
|||
xform = dc->w.xformWorld2Wnd;
|
||||
|
||||
/* Set MM_TEXT */
|
||||
dc->w.MapMode = MM_TEXT;
|
||||
dc->Dc_Attr.iMapMode = MM_TEXT;
|
||||
dc->vportOrgX = 0;
|
||||
dc->vportOrgY = 0;
|
||||
dc->wndOrgX = 0;
|
||||
dc->wndOrgY = 0;
|
||||
graphicsMode = dc->w.GraphicsMode;
|
||||
dc->w.GraphicsMode = GM_ADVANCED;
|
||||
graphicsMode = dc->Dc_Attr.iGraphicsMode;
|
||||
dc->Dc_Attr.iGraphicsMode = GM_ADVANCED;
|
||||
IntGdiModifyWorldTransform(dc, &xform, MWT_IDENTITY);
|
||||
dc->w.GraphicsMode = graphicsMode;
|
||||
dc->Dc_Attr.iGraphicsMode = graphicsMode;
|
||||
|
||||
/* Allocate enough memory for the worst case without beziers (one PT_MOVETO
|
||||
* and the rest PT_LINETO with PT_CLOSEFIGURE at the end) plus some buffer
|
||||
|
@ -1599,7 +1599,7 @@ end:
|
|||
if(pLinePts)ExFreePool(pLinePts);
|
||||
|
||||
/* Restore the old mapping mode */
|
||||
dc->w.MapMode = mapMode;
|
||||
dc->Dc_Attr.iMapMode = mapMode;
|
||||
dc->wndExtX = szWindowExt.cx;
|
||||
dc->wndExtY = szWindowExt.cy;
|
||||
dc->wndOrgX = ptWindowOrg.x;
|
||||
|
|
|
@ -578,7 +578,7 @@ FillPolygon(
|
|||
if (NULL == list)
|
||||
return FALSE;
|
||||
|
||||
if ( WINDING == dc->w.polyFillMode )
|
||||
if ( WINDING == dc->Dc_Attr.jFillMode )
|
||||
FillScanLine = POLYGONFILL_FillScanLineWinding;
|
||||
else /* default */
|
||||
FillScanLine = POLYGONFILL_FillScanLineAlternate;
|
||||
|
|
|
@ -1855,7 +1855,7 @@ BOOL FASTCALL REGION_LPTODP(HDC hdc, HRGN hDest, HRGN hSrc)
|
|||
if(!dc)
|
||||
return ret;
|
||||
|
||||
if(dc->w.MapMode == MM_TEXT) // Requires only a translation
|
||||
if(dc->Dc_Attr.iMapMode == MM_TEXT) // Requires only a translation
|
||||
{
|
||||
if(NtGdiCombineRgn(hDest, hSrc, 0, RGN_COPY) == ERROR)
|
||||
goto done;
|
||||
|
@ -2570,7 +2570,7 @@ NtGdiPaintRgn(HDC hDC,
|
|||
(PRECTL)visrgn->Buffer,
|
||||
(PRECTL)&visrgn->rdh.rcBound );
|
||||
ASSERT( ClipRegion );
|
||||
pBrush = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||
pBrush = BRUSHOBJ_LockBrush(dc->Dc_Attr.hbrush);
|
||||
ASSERT(pBrush);
|
||||
IntGdiInitBrushInstance(&BrushInst, pBrush, dc->XlateBrush);
|
||||
|
||||
|
|
|
@ -1697,7 +1697,7 @@ NtGdiExtTextOut(
|
|||
{
|
||||
goto fail;
|
||||
}
|
||||
hBrushFg = NtGdiCreateSolidBrush(XLATEOBJ_iXlate(XlateObj, dc->w.textColor), 0);
|
||||
hBrushFg = NtGdiCreateSolidBrush(XLATEOBJ_iXlate(XlateObj, dc->Dc_Attr.crForegroundClr), 0);
|
||||
if ( !hBrushFg )
|
||||
{
|
||||
goto fail;
|
||||
|
@ -1708,9 +1708,9 @@ NtGdiExtTextOut(
|
|||
goto fail;
|
||||
}
|
||||
IntGdiInitBrushInstance(&BrushFgInst, BrushFg, NULL);
|
||||
if ((fuOptions & ETO_OPAQUE) || dc->w.backgroundMode == OPAQUE)
|
||||
if ((fuOptions & ETO_OPAQUE) || dc->Dc_Attr.jBkMode == OPAQUE)
|
||||
{
|
||||
hBrushBg = NtGdiCreateSolidBrush(XLATEOBJ_iXlate(XlateObj, dc->w.backgroundColor), 0);
|
||||
hBrushBg = NtGdiCreateSolidBrush(XLATEOBJ_iXlate(XlateObj, dc->Dc_Attr.crBackgroundClr), 0);
|
||||
if ( !hBrushBg )
|
||||
{
|
||||
goto fail;
|
||||
|
@ -1758,13 +1758,13 @@ NtGdiExtTextOut(
|
|||
}
|
||||
else
|
||||
{
|
||||
if (dc->w.backgroundMode == OPAQUE)
|
||||
if (dc->Dc_Attr.jBkMode == OPAQUE)
|
||||
{
|
||||
fuOptions |= ETO_OPAQUE;
|
||||
}
|
||||
}
|
||||
|
||||
TextObj = TEXTOBJ_LockText(dc->w.hFont);
|
||||
TextObj = TEXTOBJ_LockText(dc->Dc_Attr.hlfntNew);
|
||||
if(TextObj == NULL)
|
||||
{
|
||||
goto fail;
|
||||
|
@ -1827,9 +1827,9 @@ NtGdiExtTextOut(
|
|||
* Process the vertical alignment and determine the yoff.
|
||||
*/
|
||||
|
||||
if (dc->w.textAlign & TA_BASELINE)
|
||||
if (dc->Dc_Attr.lTextAlign & TA_BASELINE)
|
||||
yoff = 0;
|
||||
else if (dc->w.textAlign & TA_BOTTOM)
|
||||
else if (dc->Dc_Attr.lTextAlign & TA_BOTTOM)
|
||||
yoff = -face->size->metrics.descender >> 6;
|
||||
else /* TA_TOP */
|
||||
yoff = face->size->metrics.ascender >> 6;
|
||||
|
@ -1841,7 +1841,7 @@ NtGdiExtTextOut(
|
|||
* Process the horizontal alignment and modify XStart accordingly.
|
||||
*/
|
||||
|
||||
if (dc->w.textAlign & (TA_RIGHT | TA_CENTER))
|
||||
if (dc->Dc_Attr.lTextAlign & (TA_RIGHT | TA_CENTER))
|
||||
{
|
||||
ULONGLONG TextWidth = 0;
|
||||
LPCWSTR TempText = String;
|
||||
|
@ -1905,7 +1905,7 @@ NtGdiExtTextOut(
|
|||
|
||||
previous = 0;
|
||||
|
||||
if (dc->w.textAlign & TA_RIGHT)
|
||||
if (dc->Dc_Attr.lTextAlign & TA_RIGHT)
|
||||
{
|
||||
RealXStart -= TextWidth;
|
||||
}
|
||||
|
@ -2205,7 +2205,7 @@ NtGdiGetCharABCWidths(HDC hDC,
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
hFont = dc->w.hFont;
|
||||
hFont = dc->Dc_Attr.hlfntNew;
|
||||
TextObj = TEXTOBJ_LockText(hFont);
|
||||
DC_UnlockDc(dc);
|
||||
|
||||
|
@ -2349,7 +2349,7 @@ NtGdiGetCharWidth32(HDC hDC,
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
hFont = dc->w.hFont;
|
||||
hFont = dc->Dc_Attr.hlfntNew;
|
||||
TextObj = TEXTOBJ_LockText(hFont);
|
||||
DC_UnlockDc(dc);
|
||||
|
||||
|
@ -2515,7 +2515,7 @@ NtGdiGetGlyphOutline(
|
|||
return GDI_ERROR;
|
||||
}
|
||||
eM11 = dc->w.xformWorld2Vport.eM11;
|
||||
hFont = dc->w.hFont;
|
||||
hFont = dc->Dc_Attr.hlfntNew;
|
||||
TextObj = TEXTOBJ_LockText(hFont);
|
||||
DC_UnlockDc(dc);
|
||||
if (!TextObj)
|
||||
|
@ -3138,7 +3138,7 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
hFont = dc->w.hFont;
|
||||
hFont = dc->Dc_Attr.hlfntNew;
|
||||
TextObj = TEXTOBJ_LockText(hFont);
|
||||
DC_UnlockDc(dc);
|
||||
if (TextObj == NULL)
|
||||
|
@ -3217,7 +3217,7 @@ NtGdiGetTextCharsetInfo(
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return Ret;
|
||||
}
|
||||
hFont = Dc->w.hFont;
|
||||
hFont = Dc->Dc_Attr.hlfntNew;
|
||||
TextObj = TEXTOBJ_LockText(hFont);
|
||||
DC_UnlockDc( Dc );
|
||||
if ( TextObj == NULL)
|
||||
|
@ -3493,7 +3493,7 @@ NtGdiGetTextExtentExW(
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
TextObj = TEXTOBJ_LockText(dc->w.hFont);
|
||||
TextObj = TEXTOBJ_LockText(dc->Dc_Attr.hlfntNew);
|
||||
if ( TextObj )
|
||||
{
|
||||
Result = TextIntGetTextExtentPoint(dc, TextObj, String, Count, MaxExtent,
|
||||
|
@ -3621,7 +3621,7 @@ NtGdiGetTextExtentPoint32(HDC hDC,
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
TextObj = TEXTOBJ_LockText(dc->w.hFont);
|
||||
TextObj = TEXTOBJ_LockText(dc->Dc_Attr.hlfntNew);
|
||||
if ( TextObj != NULL )
|
||||
{
|
||||
Result = TextIntGetTextExtentPoint (
|
||||
|
@ -3671,7 +3671,7 @@ NtGdiGetTextFaceW(
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
hFont = Dc->w.hFont;
|
||||
hFont = Dc->Dc_Attr.hlfntNew;
|
||||
DC_UnlockDc(Dc);
|
||||
|
||||
TextObj = TEXTOBJ_LockText(hFont);
|
||||
|
@ -3721,7 +3721,7 @@ NtGdiGetTextMetricsW(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
TextObj = TEXTOBJ_LockText(dc->w.hFont);
|
||||
TextObj = TEXTOBJ_LockText(dc->Dc_Attr.hlfntNew);
|
||||
if (NULL != TextObj)
|
||||
{
|
||||
FontGDI = ObjToGDI(TextObj->Font, FONT);
|
||||
|
@ -3842,8 +3842,8 @@ NtGdiSetTextAlign(HDC hDC,
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
prevAlign = dc->w.textAlign;
|
||||
dc->w.textAlign = Mode;
|
||||
prevAlign = dc->Dc_Attr.lTextAlign;
|
||||
dc->Dc_Attr.lTextAlign = Mode;
|
||||
DC_UnlockDc( dc );
|
||||
return prevAlign;
|
||||
}
|
||||
|
@ -3863,9 +3863,9 @@ NtGdiSetTextColor(HDC hDC,
|
|||
return CLR_INVALID;
|
||||
}
|
||||
|
||||
oldColor = dc->w.textColor;
|
||||
dc->w.textColor = color;
|
||||
hBrush = dc->w.hBrush;
|
||||
oldColor = dc->Dc_Attr.crForegroundClr;
|
||||
dc->Dc_Attr.crForegroundClr = color;
|
||||
hBrush = dc->Dc_Attr.hbrush;
|
||||
DC_UnlockDc( dc );
|
||||
NtGdiSelectObject(hDC, hBrush);
|
||||
return oldColor;
|
||||
|
@ -3901,7 +3901,7 @@ NtGdiGetFontData(
|
|||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
hFont = Dc->w.hFont;
|
||||
hFont = Dc->Dc_Attr.hlfntNew;
|
||||
TextObj = TEXTOBJ_LockText(hFont);
|
||||
DC_UnlockDc(Dc);
|
||||
|
||||
|
@ -4196,8 +4196,8 @@ NtGdiGetSetTextCharExtra( HDC hDC, INT CharExtra, BOOL Set)
|
|||
return Ret;
|
||||
}
|
||||
DPRINT("TextCharacterExtra %d", CharExtra);
|
||||
Ret = dc->w.charExtra;
|
||||
if( Set ) dc->w.charExtra = CharExtra;
|
||||
Ret = dc->Dc_Attr.lTextExtra;
|
||||
if( Set ) dc->Dc_Attr.lTextExtra = CharExtra;
|
||||
DC_UnlockDc(dc);
|
||||
return (Ret);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue