mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
[WIN32K]
Implement support for hatch brush masks. svn path=/trunk/; revision=66231
This commit is contained in:
parent
88cc747e0b
commit
becf1bd404
1 changed files with 31 additions and 1 deletions
|
@ -424,7 +424,37 @@ SURFOBJ*
|
||||||
NTAPI
|
NTAPI
|
||||||
EBRUSHOBJ_psoMask(EBRUSHOBJ *pebo)
|
EBRUSHOBJ_psoMask(EBRUSHOBJ *pebo)
|
||||||
{
|
{
|
||||||
return NULL;
|
HBITMAP hbmMask;
|
||||||
|
PSURFACE psurfMask;
|
||||||
|
PPDEVOBJ ppdev;
|
||||||
|
|
||||||
|
/* Check if we don't have a mask yet */
|
||||||
|
if (pebo->psoMask == NULL)
|
||||||
|
{
|
||||||
|
/* Check if this is a hatch brush */
|
||||||
|
if (pebo->flattrs & BR_IS_HATCH)
|
||||||
|
{
|
||||||
|
/* Get the PDEV */
|
||||||
|
ppdev = (PPDEVOBJ)pebo->psurfTrg->SurfObj.hdev;
|
||||||
|
if (!ppdev)
|
||||||
|
ppdev = gppdevPrimary;
|
||||||
|
|
||||||
|
/* Use the hatch bitmap as the mask */
|
||||||
|
hbmMask = (HBITMAP)ppdev->ahsurf[pebo->pbrush->iHatch];
|
||||||
|
psurfMask = SURFACE_ShareLockSurface(hbmMask);
|
||||||
|
if (psurfMask == NULL)
|
||||||
|
{
|
||||||
|
ERR("Failed to lock hatch brush for PDEV %p, iHatch %lu\n",
|
||||||
|
ppdev, pebo->pbrush->iHatch);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
NT_ASSERT(psurfMask->SurfObj.iBitmapFormat == BMF_1BPP);
|
||||||
|
pebo->psoMask = &psurfMask->SurfObj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pebo->psoMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Exported DDI functions ****************************************************/
|
/** Exported DDI functions ****************************************************/
|
||||||
|
|
Loading…
Reference in a new issue