mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
Add new examples for retrieving DC origin.
svn path=/trunk/; revision=33015
This commit is contained in:
parent
21a34d3ba5
commit
6449849098
2 changed files with 28 additions and 5 deletions
|
@ -97,7 +97,7 @@ typedef struct _DC
|
||||||
HDC hNext;
|
HDC hNext;
|
||||||
HDC hPrev;
|
HDC hPrev;
|
||||||
RECTL erclClip;
|
RECTL erclClip;
|
||||||
POINTL ptlSaveFillOrig;
|
POINTL ptlDCOrig;
|
||||||
RECTL erclWindow;
|
RECTL erclWindow;
|
||||||
RECTL erclBounds;
|
RECTL erclBounds;
|
||||||
RECTL erclBoundsApp;
|
RECTL erclBoundsApp;
|
||||||
|
|
|
@ -1116,8 +1116,8 @@ IntGdiGetDCOrgEx(DC *dc, LPPOINT Point)
|
||||||
LONG FASTCALL
|
LONG FASTCALL
|
||||||
IntCalcFillOrigin(PDC pdc)
|
IntCalcFillOrigin(PDC pdc)
|
||||||
{
|
{
|
||||||
pdc->ptlFillOrigin.x = pdc->DcLevel.ptlBrushOrigin.x + pdc->ptlSaveFillOrig.x;
|
pdc->ptlFillOrigin.x = pdc->DcLevel.ptlBrushOrigin.x + pdc->ptlDCOrig.x;
|
||||||
pdc->ptlFillOrigin.y = pdc->DcLevel.ptlBrushOrigin.y + pdc->ptlSaveFillOrig.y;
|
pdc->ptlFillOrigin.y = pdc->DcLevel.ptlBrushOrigin.y + pdc->ptlDCOrig.y;
|
||||||
|
|
||||||
return pdc->ptlFillOrigin.y;
|
return pdc->ptlFillOrigin.y;
|
||||||
}
|
}
|
||||||
|
@ -1131,8 +1131,8 @@ GdiSetDCOrg(HDC hDC, LONG Left, LONG Top, PRECTL prc)
|
||||||
pdc = DC_LockDc(hDC);
|
pdc = DC_LockDc(hDC);
|
||||||
if (!pdc) return;
|
if (!pdc) return;
|
||||||
|
|
||||||
pdc->ptlSaveFillOrig.x = Left;
|
pdc->ptlDCOrig.x = Left;
|
||||||
pdc->ptlSaveFillOrig.y = Top;
|
pdc->ptlDCOrig.y = Top;
|
||||||
|
|
||||||
IntCalcFillOrigin(pdc);
|
IntCalcFillOrigin(pdc);
|
||||||
|
|
||||||
|
@ -1141,6 +1141,29 @@ GdiSetDCOrg(HDC hDC, LONG Left, LONG Top, PRECTL prc)
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL FASTCALL
|
||||||
|
IntGdiGetDCOrg(PDC pDc, PPOINTL ppt)
|
||||||
|
{
|
||||||
|
*ppt = pDc->ptlDCOrig;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
GdiGetDCOrgEx(HDC hDC, PPOINTL ppt, PRECTL prc)
|
||||||
|
{
|
||||||
|
PDC pdc;
|
||||||
|
|
||||||
|
pdc = DC_LockDc(hDC);
|
||||||
|
if (!pdc) return FALSE;
|
||||||
|
|
||||||
|
*prc = pdc->erclWindow;
|
||||||
|
*ppt = pdc->ptlDCOrig;
|
||||||
|
|
||||||
|
DC_UnlockDc(pdc);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
IntGetAspectRatioFilter(PDC pDC,
|
IntGetAspectRatioFilter(PDC pDC,
|
||||||
LPSIZE AspectRatio)
|
LPSIZE AspectRatio)
|
||||||
|
|
Loading…
Reference in a new issue