mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:55:41 +00:00
Stefan Ginsberg <stefan__100__ at hotmail.com>
- Remove old DCOrg and replace it with ptlDCOrig. svn path=/trunk/; revision=33828
This commit is contained in:
parent
ae9a18969f
commit
114a366a38
11 changed files with 92 additions and 113 deletions
|
@ -64,12 +64,8 @@ typedef struct _WIN_DC_INFO
|
||||||
GdiPath path;
|
GdiPath path;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
RECT totalExtent;
|
|
||||||
BYTE bitsPerPixel;
|
BYTE bitsPerPixel;
|
||||||
|
|
||||||
INT DCOrgX; /* DC origin */
|
|
||||||
INT DCOrgY;
|
|
||||||
|
|
||||||
XFORM xformWorld2Wnd; /* World-to-window transformation */
|
XFORM xformWorld2Wnd; /* World-to-window transformation */
|
||||||
XFORM xformWorld2Vport; /* World-to-viewport transformation */
|
XFORM xformWorld2Vport; /* World-to-viewport transformation */
|
||||||
XFORM xformVport2World; /* Inverse of the above transformation */
|
XFORM xformVport2World; /* Inverse of the above transformation */
|
||||||
|
|
|
@ -135,7 +135,7 @@ BOOL FASTCALL IntGdiGradientFill(DC *dc,
|
||||||
/* DC functions */
|
/* DC functions */
|
||||||
|
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
IntGdiGetDCOrgEx(DC *dc, LPPOINT Point);
|
IntGdiGetDCOrg(PDC pDC, PPOINTL pPointl);
|
||||||
|
|
||||||
INT FASTCALL
|
INT FASTCALL
|
||||||
IntGdiGetObject(HANDLE handle, INT count, LPVOID buffer);
|
IntGdiGetObject(HANDLE handle, INT count, LPVOID buffer);
|
||||||
|
|
|
@ -167,21 +167,21 @@ DceSetDrawable(PWINDOW_OBJECT Window OPTIONAL, HDC hDC, ULONG Flags,
|
||||||
|
|
||||||
if (Window == NULL)
|
if (Window == NULL)
|
||||||
{
|
{
|
||||||
dc->w.DCOrgX = 0;
|
dc->ptlDCOrig.x = 0;
|
||||||
dc->w.DCOrgY = 0;
|
dc->ptlDCOrig.y = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Wnd = Window->Wnd;
|
Wnd = Window->Wnd;
|
||||||
if (Flags & DCX_WINDOW)
|
if (Flags & DCX_WINDOW)
|
||||||
{
|
{
|
||||||
dc->w.DCOrgX = Wnd->WindowRect.left;
|
dc->ptlDCOrig.x = Wnd->WindowRect.left;
|
||||||
dc->w.DCOrgY = Wnd->WindowRect.top;
|
dc->ptlDCOrig.y = Wnd->WindowRect.top;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dc->w.DCOrgX = Wnd->ClientRect.left;
|
dc->ptlDCOrig.x = Wnd->ClientRect.left;
|
||||||
dc->w.DCOrgY = Wnd->ClientRect.top;
|
dc->ptlDCOrig.y = Wnd->ClientRect.top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
|
@ -726,17 +726,17 @@ DceResetActiveDCEs(PWINDOW_OBJECT Window)
|
||||||
{
|
{
|
||||||
if (pDCE->DCXFlags & DCX_WINDOW)
|
if (pDCE->DCXFlags & DCX_WINDOW)
|
||||||
{
|
{
|
||||||
DeltaX = CurrentWindow->Wnd->WindowRect.left - dc->w.DCOrgX;
|
DeltaX = CurrentWindow->Wnd->WindowRect.left - dc->ptlDCOrig.x;
|
||||||
DeltaY = CurrentWindow->Wnd->WindowRect.top - dc->w.DCOrgY;
|
DeltaY = CurrentWindow->Wnd->WindowRect.top - dc->ptlDCOrig.y;
|
||||||
dc->w.DCOrgX = CurrentWindow->Wnd->WindowRect.left;
|
dc->ptlDCOrig.x = CurrentWindow->Wnd->WindowRect.left;
|
||||||
dc->w.DCOrgY = CurrentWindow->Wnd->WindowRect.top;
|
dc->ptlDCOrig.y = CurrentWindow->Wnd->WindowRect.top;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DeltaX = CurrentWindow->Wnd->ClientRect.left - dc->w.DCOrgX;
|
DeltaX = CurrentWindow->Wnd->ClientRect.left - dc->ptlDCOrig.x;
|
||||||
DeltaY = CurrentWindow->Wnd->ClientRect.top - dc->w.DCOrgY;
|
DeltaY = CurrentWindow->Wnd->ClientRect.top - dc->ptlDCOrig.y;
|
||||||
dc->w.DCOrgX = CurrentWindow->Wnd->ClientRect.left;
|
dc->ptlDCOrig.x = CurrentWindow->Wnd->ClientRect.left;
|
||||||
dc->w.DCOrgY = CurrentWindow->Wnd->ClientRect.top;
|
dc->ptlDCOrig.y = CurrentWindow->Wnd->ClientRect.top;
|
||||||
}
|
}
|
||||||
if (NULL != dc->w.hClipRgn)
|
if (NULL != dc->w.hClipRgn)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,10 +87,10 @@ NtGdiAlphaBlend(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Offset the destination and source by the origin of their DCs. */
|
/* Offset the destination and source by the origin of their DCs. */
|
||||||
XOriginDest += DCDest->w.DCOrgX;
|
XOriginDest += DCDest->ptlDCOrig.x;
|
||||||
YOriginDest += DCDest->w.DCOrgY;
|
YOriginDest += DCDest->ptlDCOrig.y;
|
||||||
XOriginSrc += DCSrc->w.DCOrgX;
|
XOriginSrc += DCSrc->ptlDCOrig.x;
|
||||||
YOriginSrc += DCSrc->w.DCOrgY;
|
YOriginSrc += DCSrc->ptlDCOrig.y;
|
||||||
|
|
||||||
DestRect.left = XOriginDest;
|
DestRect.left = XOriginDest;
|
||||||
DestRect.top = YOriginDest;
|
DestRect.top = YOriginDest;
|
||||||
|
@ -228,12 +228,12 @@ NtGdiBitBlt(
|
||||||
if (!Dc_Attr) Dc_Attr = &DCDest->Dc_Attr;
|
if (!Dc_Attr) Dc_Attr = &DCDest->Dc_Attr;
|
||||||
|
|
||||||
/* Offset the destination and source by the origin of their DCs. */
|
/* Offset the destination and source by the origin of their DCs. */
|
||||||
XDest += DCDest->w.DCOrgX;
|
XDest += DCDest->ptlDCOrig.x;
|
||||||
YDest += DCDest->w.DCOrgY;
|
YDest += DCDest->ptlDCOrig.y;
|
||||||
if (UsesSource)
|
if (UsesSource)
|
||||||
{
|
{
|
||||||
XSrc += DCSrc->w.DCOrgX;
|
XSrc += DCSrc->ptlDCOrig.x;
|
||||||
YSrc += DCSrc->w.DCOrgY;
|
YSrc += DCSrc->ptlDCOrig.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
DestRect.left = XDest;
|
DestRect.left = XDest;
|
||||||
|
@ -392,10 +392,10 @@ NtGdiTransparentBlt(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Offset positions */
|
/* Offset positions */
|
||||||
xDst += DCDest->w.DCOrgX;
|
xDst += DCDest->ptlDCOrig.x;
|
||||||
yDst += DCDest->w.DCOrgY;
|
yDst += DCDest->ptlDCOrig.y;
|
||||||
xSrc += DCSrc->w.DCOrgX;
|
xSrc += DCSrc->ptlDCOrig.x;
|
||||||
ySrc += DCSrc->w.DCOrgY;
|
ySrc += DCSrc->ptlDCOrig.y;
|
||||||
|
|
||||||
BitmapDest = BITMAPOBJ_LockBitmap(DCDest->w.hBitmap);
|
BitmapDest = BITMAPOBJ_LockBitmap(DCDest->w.hBitmap);
|
||||||
if (!BitmapDest)
|
if (!BitmapDest)
|
||||||
|
@ -796,13 +796,13 @@ NtGdiStretchBlt(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Offset the destination and source by the origin of their DCs. */
|
/* Offset the destination and source by the origin of their DCs. */
|
||||||
// FIXME: DCOrg is in device coordinates!
|
// FIXME: ptlDCOrig is in device coordinates!
|
||||||
XOriginDest += DCDest->w.DCOrgX;
|
XOriginDest += DCDest->ptlDCOrig.x;
|
||||||
YOriginDest += DCDest->w.DCOrgY;
|
YOriginDest += DCDest->ptlDCOrig.y;
|
||||||
if (UsesSource)
|
if (UsesSource)
|
||||||
{
|
{
|
||||||
XOriginSrc += DCSrc->w.DCOrgX;
|
XOriginSrc += DCSrc->ptlDCOrig.x;
|
||||||
YOriginSrc += DCSrc->w.DCOrgY;
|
YOriginSrc += DCSrc->ptlDCOrig.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
DestRect.left = XOriginDest;
|
DestRect.left = XOriginDest;
|
||||||
|
@ -964,30 +964,30 @@ IntPatBlt(
|
||||||
{
|
{
|
||||||
if (Width > 0)
|
if (Width > 0)
|
||||||
{
|
{
|
||||||
DestRect.left = XLeft + dc->w.DCOrgX;
|
DestRect.left = XLeft + dc->ptlDCOrig.x;
|
||||||
DestRect.right = XLeft + Width + dc->w.DCOrgX;
|
DestRect.right = XLeft + Width + dc->ptlDCOrig.x;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DestRect.left = XLeft + Width + 1 + dc->w.DCOrgX;
|
DestRect.left = XLeft + Width + 1 + dc->ptlDCOrig.x;
|
||||||
DestRect.right = XLeft + dc->w.DCOrgX + 1;
|
DestRect.right = XLeft + dc->ptlDCOrig.x + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Height > 0)
|
if (Height > 0)
|
||||||
{
|
{
|
||||||
DestRect.top = YLeft + dc->w.DCOrgY;
|
DestRect.top = YLeft + dc->ptlDCOrig.y;
|
||||||
DestRect.bottom = YLeft + Height + dc->w.DCOrgY;
|
DestRect.bottom = YLeft + Height + dc->ptlDCOrig.y;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DestRect.top = YLeft + Height + dc->w.DCOrgY + 1;
|
DestRect.top = YLeft + Height + dc->ptlDCOrig.y + 1;
|
||||||
DestRect.bottom = YLeft + dc->w.DCOrgY + 1;
|
DestRect.bottom = YLeft + dc->ptlDCOrig.y + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntLPtoDP(dc, (LPPOINT)&DestRect, 2);
|
IntLPtoDP(dc, (LPPOINT)&DestRect, 2);
|
||||||
|
|
||||||
BrushOrigin.x = BrushObj->ptOrigin.x + dc->w.DCOrgX;
|
BrushOrigin.x = BrushObj->ptOrigin.x + dc->ptlDCOrig.x;
|
||||||
BrushOrigin.y = BrushObj->ptOrigin.y + dc->w.DCOrgY;
|
BrushOrigin.y = BrushObj->ptOrigin.y + dc->ptlDCOrig.y;
|
||||||
|
|
||||||
IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->XlateBrush);
|
IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->XlateBrush);
|
||||||
|
|
||||||
|
|
|
@ -256,8 +256,8 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
XPos += dc->w.DCOrgX;
|
XPos += dc->ptlDCOrig.x;
|
||||||
YPos += dc->w.DCOrgY;
|
YPos += dc->ptlDCOrig.y;
|
||||||
if ( IN_RECT(dc->CombinedClip->rclBounds,XPos,YPos) )
|
if ( IN_RECT(dc->CombinedClip->rclBounds,XPos,YPos) )
|
||||||
{
|
{
|
||||||
bInRect = TRUE;
|
bInRect = TRUE;
|
||||||
|
|
|
@ -34,7 +34,7 @@ CLIPPING_UpdateGCRegion(DC* Dc)
|
||||||
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hVisRgn, 0, RGN_COPY);
|
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hVisRgn, 0, RGN_COPY);
|
||||||
else
|
else
|
||||||
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hClipRgn, Dc->w.hVisRgn, RGN_AND);
|
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hClipRgn, Dc->w.hVisRgn, RGN_AND);
|
||||||
NtGdiOffsetRgn(Dc->w.hGCClipRgn, Dc->w.DCOrgX, Dc->w.DCOrgY);
|
NtGdiOffsetRgn(Dc->w.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y);
|
||||||
|
|
||||||
if((CombinedRegion = REGION_LockRgn(Dc->w.hGCClipRgn)))
|
if((CombinedRegion = REGION_LockRgn(Dc->w.hGCClipRgn)))
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ CLIPPING_UpdateGCRegion(DC* Dc)
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY);
|
return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->ptlDCOrig.x, -Dc->ptlDCOrig.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
INT FASTCALL
|
INT FASTCALL
|
||||||
|
@ -86,7 +86,7 @@ GdiSelectVisRgn(HDC hdc, HRGN hrgn)
|
||||||
retval = NtGdiCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY);
|
retval = NtGdiCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY);
|
||||||
if ( retval != ERROR )
|
if ( retval != ERROR )
|
||||||
{
|
{
|
||||||
NtGdiOffsetRgn(dc->w.hVisRgn, -dc->w.DCOrgX, -dc->w.DCOrgY);
|
NtGdiOffsetRgn(dc->w.hVisRgn, -dc->ptlDCOrig.x, -dc->ptlDCOrig.y);
|
||||||
CLIPPING_UpdateGCRegion(dc);
|
CLIPPING_UpdateGCRegion(dc);
|
||||||
}
|
}
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
|
|
|
@ -1134,15 +1134,6 @@ NtGdiGetDCObject(HDC hDC, INT ObjectType)
|
||||||
return SelObject;
|
return SelObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL FASTCALL
|
|
||||||
IntGdiGetDCOrgEx(DC *dc, LPPOINT Point)
|
|
||||||
{
|
|
||||||
Point->x = dc->w.DCOrgX;
|
|
||||||
Point->y = dc->w.DCOrgY;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
LONG FASTCALL
|
LONG FASTCALL
|
||||||
IntCalcFillOrigin(PDC pdc)
|
IntCalcFillOrigin(PDC pdc)
|
||||||
{
|
{
|
||||||
|
@ -1261,7 +1252,7 @@ NtGdiGetDCPoint( HDC hDC, UINT iPoint, PPOINTL Point)
|
||||||
IntGetWindowOrgEx(dc, &SafePoint);
|
IntGetWindowOrgEx(dc, &SafePoint);
|
||||||
break;
|
break;
|
||||||
case GdiGetDCOrg:
|
case GdiGetDCOrg:
|
||||||
Ret = IntGdiGetDCOrgEx(dc, &SafePoint);
|
Ret = IntGdiGetDCOrg(dc, &SafePoint);
|
||||||
break;
|
break;
|
||||||
case GdiGetAspectRatioFilter:
|
case GdiGetAspectRatioFilter:
|
||||||
Ret = IntGetAspectRatioFilter(dc, &Size);
|
Ret = IntGetAspectRatioFilter(dc, &Size);
|
||||||
|
@ -1319,7 +1310,6 @@ IntGdiCopyToSaveState(PDC dc, PDC newdc)
|
||||||
nDc_Attr->hlfntNew = Dc_Attr->hlfntNew;
|
nDc_Attr->hlfntNew = Dc_Attr->hlfntNew;
|
||||||
newdc->w.hBitmap = dc->w.hBitmap;
|
newdc->w.hBitmap = dc->w.hBitmap;
|
||||||
newdc->DcLevel.hpal = dc->DcLevel.hpal;
|
newdc->DcLevel.hpal = dc->DcLevel.hpal;
|
||||||
newdc->w.totalExtent = dc->w.totalExtent;
|
|
||||||
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
|
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
|
||||||
nDc_Attr->jROP2 = Dc_Attr->jROP2;
|
nDc_Attr->jROP2 = Dc_Attr->jROP2;
|
||||||
nDc_Attr->jFillMode = Dc_Attr->jFillMode;
|
nDc_Attr->jFillMode = Dc_Attr->jFillMode;
|
||||||
|
@ -1340,8 +1330,8 @@ IntGdiCopyToSaveState(PDC dc, PDC newdc)
|
||||||
nDc_Attr->iGraphicsMode = Dc_Attr->iGraphicsMode;
|
nDc_Attr->iGraphicsMode = Dc_Attr->iGraphicsMode;
|
||||||
#if 0
|
#if 0
|
||||||
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
||||||
newdc->w.DCOrgX = dc->w.DCOrgX;
|
newdc->ptlDCOrig.x = dc->ptlDCOrig.x;
|
||||||
newdc->w.DCOrgY = dc->w.DCOrgY;
|
newdc->ptlDCOrig.y = dc->ptlDCOrig.y;
|
||||||
#endif
|
#endif
|
||||||
nDc_Attr->ptlCurrent = Dc_Attr->ptlCurrent;
|
nDc_Attr->ptlCurrent = Dc_Attr->ptlCurrent;
|
||||||
nDc_Attr->ptfxCurrent = Dc_Attr->ptfxCurrent;
|
nDc_Attr->ptfxCurrent = Dc_Attr->ptfxCurrent;
|
||||||
|
@ -1387,7 +1377,6 @@ IntGdiCopyFromSaveState(PDC dc, PDC dcs, HDC hDC)
|
||||||
dc->DcLevel.flPath = dcs->DcLevel.flPath & ~DCPATH_SAVE;
|
dc->DcLevel.flPath = dcs->DcLevel.flPath & ~DCPATH_SAVE;
|
||||||
|
|
||||||
Dc_Attr->dwLayout = sDc_Attr->dwLayout;
|
Dc_Attr->dwLayout = sDc_Attr->dwLayout;
|
||||||
dc->w.totalExtent = dcs->w.totalExtent;
|
|
||||||
Dc_Attr->jROP2 = sDc_Attr->jROP2;
|
Dc_Attr->jROP2 = sDc_Attr->jROP2;
|
||||||
Dc_Attr->jFillMode = sDc_Attr->jFillMode;
|
Dc_Attr->jFillMode = sDc_Attr->jFillMode;
|
||||||
Dc_Attr->jStretchBltMode = sDc_Attr->jStretchBltMode;
|
Dc_Attr->jStretchBltMode = sDc_Attr->jStretchBltMode;
|
||||||
|
@ -1408,8 +1397,8 @@ IntGdiCopyFromSaveState(PDC dc, PDC dcs, HDC hDC)
|
||||||
Dc_Attr->iGraphicsMode = sDc_Attr->iGraphicsMode;
|
Dc_Attr->iGraphicsMode = sDc_Attr->iGraphicsMode;
|
||||||
#if 0
|
#if 0
|
||||||
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
/* Apparently, the DC origin is not changed by [GS]etDCState */
|
||||||
dc->w.DCOrgX = dcs->w.DCOrgX;
|
dc->ptlDCOrig.x = dcs->ptlDCOrig.x;
|
||||||
dc->w.DCOrgY = dcs->w.DCOrgY;
|
dc->ptlDCOrig.y = dcs->ptlDCOrig.y;
|
||||||
#endif
|
#endif
|
||||||
Dc_Attr->ptlCurrent = sDc_Attr->ptlCurrent;
|
Dc_Attr->ptlCurrent = sDc_Attr->ptlCurrent;
|
||||||
Dc_Attr->ptfxCurrent = sDc_Attr->ptfxCurrent;
|
Dc_Attr->ptfxCurrent = sDc_Attr->ptfxCurrent;
|
||||||
|
|
|
@ -73,8 +73,8 @@ IntGdiPolygon(PDC dc,
|
||||||
IntLPtoDP(dc, UnsafePoints, Count);
|
IntLPtoDP(dc, UnsafePoints, Count);
|
||||||
for (CurrentPoint = 0; CurrentPoint < Count; CurrentPoint++)
|
for (CurrentPoint = 0; CurrentPoint < Count; CurrentPoint++)
|
||||||
{
|
{
|
||||||
UnsafePoints[CurrentPoint].x += dc->w.DCOrgX;
|
UnsafePoints[CurrentPoint].x += dc->ptlDCOrig.x;
|
||||||
UnsafePoints[CurrentPoint].y += dc->w.DCOrgY;
|
UnsafePoints[CurrentPoint].y += dc->ptlDCOrig.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PATH_IsPathOpen(dc->w.path))
|
if (PATH_IsPathOpen(dc->w.path))
|
||||||
|
@ -273,10 +273,10 @@ NtGdiEllipse(
|
||||||
|
|
||||||
IntLPtoDP(dc, (LPPOINT)&RectBounds, 2);
|
IntLPtoDP(dc, (LPPOINT)&RectBounds, 2);
|
||||||
|
|
||||||
RectBounds.left += dc->w.DCOrgX;
|
RectBounds.left += dc->ptlDCOrig.x;
|
||||||
RectBounds.right += dc->w.DCOrgX;
|
RectBounds.right += dc->ptlDCOrig.x;
|
||||||
RectBounds.top += dc->w.DCOrgY;
|
RectBounds.top += dc->ptlDCOrig.y;
|
||||||
RectBounds.bottom += dc->w.DCOrgY;
|
RectBounds.bottom += dc->ptlDCOrig.y;
|
||||||
|
|
||||||
RadiusX = max((RectBounds.right - RectBounds.left) >> 1, 1);
|
RadiusX = max((RectBounds.right - RectBounds.left) >> 1, 1);
|
||||||
RadiusY = max((RectBounds.bottom - RectBounds.top) >> 1, 1);
|
RadiusY = max((RectBounds.bottom - RectBounds.top) >> 1, 1);
|
||||||
|
@ -683,14 +683,14 @@ NtGdiPie(HDC hDC,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Left += dc->w.DCOrgX;
|
Left += dc->ptlDCOrig.x;
|
||||||
Right += dc->w.DCOrgX;
|
Right += dc->ptlDCOrig.x;
|
||||||
Top += dc->w.DCOrgY;
|
Top += dc->ptlDCOrig.y;
|
||||||
Bottom += dc->w.DCOrgY;
|
Bottom += dc->ptlDCOrig.y;
|
||||||
XRadialStart += dc->w.DCOrgX;
|
XRadialStart += dc->ptlDCOrig.x;
|
||||||
YRadialStart += dc->w.DCOrgY;
|
YRadialStart += dc->ptlDCOrig.y;
|
||||||
XRadialEnd += dc->w.DCOrgX;
|
XRadialEnd += dc->ptlDCOrig.x;
|
||||||
YRadialEnd += dc->w.DCOrgY;
|
YRadialEnd += dc->ptlDCOrig.y;
|
||||||
|
|
||||||
RectBounds.left = Left;
|
RectBounds.left = Left;
|
||||||
RectBounds.right = Right;
|
RectBounds.right = Right;
|
||||||
|
@ -1047,10 +1047,10 @@ IntRectangle(PDC dc,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LeftRect += dc->w.DCOrgX;
|
LeftRect += dc->ptlDCOrig.x;
|
||||||
RightRect += dc->w.DCOrgX - 1;
|
RightRect += dc->ptlDCOrig.x - 1;
|
||||||
TopRect += dc->w.DCOrgY;
|
TopRect += dc->ptlDCOrig.y;
|
||||||
BottomRect += dc->w.DCOrgY - 1;
|
BottomRect += dc->ptlDCOrig.y - 1;
|
||||||
|
|
||||||
DestRect.left = LeftRect;
|
DestRect.left = LeftRect;
|
||||||
DestRect.right = RightRect;
|
DestRect.right = RightRect;
|
||||||
|
@ -1207,10 +1207,10 @@ IntRoundRect(
|
||||||
xradius = xCurveDiameter >> 1;
|
xradius = xCurveDiameter >> 1;
|
||||||
yradius = yCurveDiameter >> 1;
|
yradius = yCurveDiameter >> 1;
|
||||||
|
|
||||||
left += dc->w.DCOrgX;
|
left += dc->ptlDCOrig.x;
|
||||||
right += dc->w.DCOrgX;
|
right += dc->ptlDCOrig.x;
|
||||||
top += dc->w.DCOrgY;
|
top += dc->ptlDCOrig.y;
|
||||||
bottom += dc->w.DCOrgY;
|
bottom += dc->ptlDCOrig.y;
|
||||||
|
|
||||||
RectBounds.left = left;
|
RectBounds.left = left;
|
||||||
RectBounds.right = right;
|
RectBounds.right = right;
|
||||||
|
@ -1540,8 +1540,8 @@ IntGdiGradientFill(
|
||||||
Extent.bottom = max(Extent.bottom, (pVertex + i)->y);
|
Extent.bottom = max(Extent.bottom, (pVertex + i)->y);
|
||||||
}
|
}
|
||||||
|
|
||||||
DitherOrg.x = dc->w.DCOrgX;
|
DitherOrg.x = dc->ptlDCOrig.x;
|
||||||
DitherOrg.y = dc->w.DCOrgY;
|
DitherOrg.y = dc->ptlDCOrig.y;
|
||||||
Extent.left += DitherOrg.x;
|
Extent.left += DitherOrg.x;
|
||||||
Extent.right += DitherOrg.x;
|
Extent.right += DitherOrg.x;
|
||||||
Extent.top += DitherOrg.y;
|
Extent.top += DitherOrg.y;
|
||||||
|
|
|
@ -130,10 +130,10 @@ IntGdiLineTo(DC *dc,
|
||||||
IntLPtoDP(dc, Points, 2);
|
IntLPtoDP(dc, Points, 2);
|
||||||
|
|
||||||
/* The DCOrg is in device coordinates */
|
/* The DCOrg is in device coordinates */
|
||||||
Points[0].x += dc->w.DCOrgX;
|
Points[0].x += dc->ptlDCOrig.x;
|
||||||
Points[0].y += dc->w.DCOrgY;
|
Points[0].y += dc->ptlDCOrig.y;
|
||||||
Points[1].x += dc->w.DCOrgX;
|
Points[1].x += dc->ptlDCOrig.x;
|
||||||
Points[1].y += dc->w.DCOrgY;
|
Points[1].y += dc->ptlDCOrig.y;
|
||||||
|
|
||||||
Bounds.left = min(Points[0].x, Points[1].x);
|
Bounds.left = min(Points[0].x, Points[1].x);
|
||||||
Bounds.top = min(Points[0].y, Points[1].y);
|
Bounds.top = min(Points[0].y, Points[1].y);
|
||||||
|
@ -281,8 +281,8 @@ IntGdiPolyline(DC *dc,
|
||||||
/* Offset the array of point by the dc->w.DCOrg */
|
/* Offset the array of point by the dc->w.DCOrg */
|
||||||
for (i = 0; i < Count; i++)
|
for (i = 0; i < Count; i++)
|
||||||
{
|
{
|
||||||
Points[i].x += dc->w.DCOrgX;
|
Points[i].x += dc->ptlDCOrig.x;
|
||||||
Points[i].y += dc->w.DCOrgY;
|
Points[i].y += dc->ptlDCOrig.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen);
|
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen);
|
||||||
|
|
|
@ -2645,7 +2645,7 @@ NtGdiGetRandomRgn(
|
||||||
}
|
}
|
||||||
if (iCode == SYSRGN)
|
if (iCode == SYSRGN)
|
||||||
{
|
{
|
||||||
IntGdiGetDCOrgEx(pDC, &org);
|
IntGdiGetDCOrg(pDC, &org);
|
||||||
NtGdiOffsetRgn(hDest, org.x, org.y );
|
NtGdiOffsetRgn(hDest, org.x, org.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2828,7 +2828,7 @@ IntGdiPaintRgn(
|
||||||
|
|
||||||
/* ei enable later
|
/* ei enable later
|
||||||
// Transform region into device co-ords
|
// Transform region into device co-ords
|
||||||
if (!REGION_LPTODP(hDC, tmpVisRgn, hRgn) || NtGdiOffsetRgn(tmpVisRgn, dc->w.DCOrgX, dc->w.DCOrgY) == ERROR)
|
if (!REGION_LPTODP(hDC, tmpVisRgn, hRgn) || NtGdiOffsetRgn(tmpVisRgn, dc->ptlDCOrig.x, dc->ptlDCOrig.y) == ERROR)
|
||||||
{
|
{
|
||||||
NtGdiDeleteObject(tmpVisRgn);
|
NtGdiDeleteObject(tmpVisRgn);
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
|
|
|
@ -1626,8 +1626,8 @@ NtGdiExtTextOutW(
|
||||||
Start.x = XStart; Start.y = YStart;
|
Start.x = XStart; Start.y = YStart;
|
||||||
IntLPtoDP(dc, &Start, 1);
|
IntLPtoDP(dc, &Start, 1);
|
||||||
|
|
||||||
RealXStart = (Start.x + dc->w.DCOrgX) << 6;
|
RealXStart = (Start.x + dc->ptlDCOrig.x) << 6;
|
||||||
YStart = Start.y + dc->w.DCOrgY;
|
YStart = Start.y + dc->ptlDCOrig.y;
|
||||||
|
|
||||||
/* Create the brushes */
|
/* Create the brushes */
|
||||||
hDestPalette = BitmapObj->hDIBPalette;
|
hDestPalette = BitmapObj->hDIBPalette;
|
||||||
|
@ -1685,10 +1685,10 @@ NtGdiExtTextOutW(
|
||||||
|
|
||||||
if ((fuOptions & ETO_OPAQUE) && lprc)
|
if ((fuOptions & ETO_OPAQUE) && lprc)
|
||||||
{
|
{
|
||||||
DestRect.left = SpecifiedDestRect.left + dc->w.DCOrgX;
|
DestRect.left = SpecifiedDestRect.left + dc->ptlDCOrig.x;
|
||||||
DestRect.top = SpecifiedDestRect.top + dc->w.DCOrgY;
|
DestRect.top = SpecifiedDestRect.top + dc->ptlDCOrig.y;
|
||||||
DestRect.right = SpecifiedDestRect.right + dc->w.DCOrgX;
|
DestRect.right = SpecifiedDestRect.right + dc->ptlDCOrig.x;
|
||||||
DestRect.bottom = SpecifiedDestRect.bottom + dc->w.DCOrgY;
|
DestRect.bottom = SpecifiedDestRect.bottom + dc->ptlDCOrig.y;
|
||||||
IntLPtoDP(dc, (LPPOINT)&DestRect, 2);
|
IntLPtoDP(dc, (LPPOINT)&DestRect, 2);
|
||||||
IntEngBitBlt(
|
IntEngBitBlt(
|
||||||
&BitmapObj->SurfObj,
|
&BitmapObj->SurfObj,
|
||||||
|
@ -1956,12 +1956,6 @@ NtGdiExtTextOutW(
|
||||||
DestRect.top = TextTop + yoff - realglyph2->top;
|
DestRect.top = TextTop + yoff - realglyph2->top;
|
||||||
DestRect.bottom = DestRect.top + realglyph2->bitmap.rows;
|
DestRect.bottom = DestRect.top + realglyph2->bitmap.rows;
|
||||||
|
|
||||||
// DbgPrint("lrtb %d %d %d %d\n", DestRect.left, DestRect.right,
|
|
||||||
// DestRect.top, DestRect.bottom);
|
|
||||||
// DbgPrint("specified lrtb %d %d %d %d\n", SpecifiedDestRect.left, SpecifiedDestRect.right,
|
|
||||||
// SpecifiedDestRect.top, SpecifiedDestRect.bottom);
|
|
||||||
// DbgPrint ("dc->w.DCOrgX: %d\n", dc->w.DCOrgX);
|
|
||||||
|
|
||||||
bitSize.cx = realglyph2->bitmap.width;
|
bitSize.cx = realglyph2->bitmap.width;
|
||||||
bitSize.cy = realglyph2->bitmap.rows;
|
bitSize.cy = realglyph2->bitmap.rows;
|
||||||
MaskRect.right = realglyph2->bitmap.width;
|
MaskRect.right = realglyph2->bitmap.width;
|
||||||
|
@ -2005,12 +1999,12 @@ NtGdiExtTextOutW(
|
||||||
|
|
||||||
if (lprc &&
|
if (lprc &&
|
||||||
(fuOptions & ETO_CLIPPED) &&
|
(fuOptions & ETO_CLIPPED) &&
|
||||||
DestRect.right >= SpecifiedDestRect.right + dc->w.DCOrgX)
|
DestRect.right >= SpecifiedDestRect.right + dc->ptlDCOrig.x)
|
||||||
{
|
{
|
||||||
// We do the check '>=' instead of '>' to possibly save an iteration
|
// We do the check '>=' instead of '>' to possibly save an iteration
|
||||||
// through this loop, since it's breaking after the drawing is done,
|
// through this loop, since it's breaking after the drawing is done,
|
||||||
// and x is always incremented.
|
// and x is always incremented.
|
||||||
DestRect.right = SpecifiedDestRect.right + dc->w.DCOrgX;
|
DestRect.right = SpecifiedDestRect.right + dc->ptlDCOrig.x;
|
||||||
DoBreak = TRUE;
|
DoBreak = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue