mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 14:09:10 +00:00
[NtGDI]
- Use internal function for setting brush origin. Related to CORE-13110. svn path=/trunk/; revision=74422
This commit is contained in:
parent
4535174660
commit
a1290edbe7
|
@ -168,16 +168,12 @@ NtGdiSetBrushOrg(
|
||||||
_In_ INT y,
|
_In_ INT y,
|
||||||
_Out_opt_ LPPOINT pptOut)
|
_Out_opt_ LPPOINT pptOut)
|
||||||
{
|
{
|
||||||
PDC pdc;
|
|
||||||
|
|
||||||
/* Lock the DC */
|
POINT ptOut;
|
||||||
pdc = DC_LockDc(hdc);
|
/* Call the internal function */
|
||||||
if (pdc == NULL)
|
BOOL Ret = GreSetBrushOrg( hdc, x, y, &ptOut);
|
||||||
|
if (Ret)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check if the old origin was requested */
|
/* Check if the old origin was requested */
|
||||||
if (pptOut != NULL)
|
if (pptOut != NULL)
|
||||||
{
|
{
|
||||||
|
@ -186,22 +182,16 @@ NtGdiSetBrushOrg(
|
||||||
{
|
{
|
||||||
/* Probe and copy the old origin */
|
/* Probe and copy the old origin */
|
||||||
ProbeForWrite(pptOut, sizeof(POINT), 1);
|
ProbeForWrite(pptOut, sizeof(POINT), 1);
|
||||||
*pptOut = pdc->pdcattr->ptlBrushOrigin;
|
*pptOut = ptOut;
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
DC_UnlockDc(pdc);
|
|
||||||
_SEH2_YIELD(return FALSE);
|
_SEH2_YIELD(return FALSE);
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Call the internal function */
|
return Ret;
|
||||||
DC_vSetBrushOrigin(pdc, x, y);
|
|
||||||
|
|
||||||
/* Unlock the DC and return success */
|
|
||||||
DC_UnlockDc(pdc);
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HPALETTE
|
HPALETTE
|
||||||
|
|
Loading…
Reference in a new issue