mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 01:15:42 +00:00
Add the DC XlateBrush / XlatePen hack to DC_vUpdateFillBrush / DC_vUpdateLineBrush, so these should now be a full replacement for the current usage of IntGdiSelectPen/Brush + EBRUSHOBJ_vInit
svn path=/trunk/; revision=40279
This commit is contained in:
parent
c14d3364c7
commit
47bc28fa47
1 changed files with 21 additions and 6 deletions
|
@ -72,12 +72,9 @@ DC_vUpdateFillBrush(PDC pdc)
|
||||||
{
|
{
|
||||||
PDC_ATTR pdcattr = pdc->pdcattr;
|
PDC_ATTR pdcattr = pdc->pdcattr;
|
||||||
PBRUSH pbrFill;
|
PBRUSH pbrFill;
|
||||||
XLATEOBJ *pxlo;
|
XLATEOBJ *pxlo = NULL;
|
||||||
ULONG iSolidColor;
|
ULONG iSolidColor;
|
||||||
|
|
||||||
/* ROS HACK, should use surf xlate */
|
|
||||||
pxlo = pdc->rosdc.XlatePen;
|
|
||||||
|
|
||||||
/* Check if the brush handle has changed */
|
/* Check if the brush handle has changed */
|
||||||
if (pdcattr->hbrush != pdc->dclevel.pbrFill->BaseObject.hHmgr)
|
if (pdcattr->hbrush != pdc->dclevel.pbrFill->BaseObject.hHmgr)
|
||||||
{
|
{
|
||||||
|
@ -89,16 +86,25 @@ DC_vUpdateFillBrush(PDC pdc)
|
||||||
BRUSH_ShareUnlockBrush(pdc->dclevel.pbrFill);
|
BRUSH_ShareUnlockBrush(pdc->dclevel.pbrFill);
|
||||||
pdc->dclevel.pbrFill = pbrFill;
|
pdc->dclevel.pbrFill = pbrFill;
|
||||||
|
|
||||||
|
/* ROS HACK, should use surf xlate */
|
||||||
|
IntUpdateBrushXlate(pdc, &pdc->rosdc.XlateBrush, pbrFill);
|
||||||
|
|
||||||
/* Update eboFill, realizing it, if needed */
|
/* Update eboFill, realizing it, if needed */
|
||||||
EBRUSHOBJ_vUpdate(&pdc->eboFill, pbrFill, pxlo);
|
EBRUSHOBJ_vUpdate(&pdc->eboFill, pbrFill, pdc->rosdc.XlateBrush);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Invalid brush handle, restore old one */
|
/* Invalid brush handle, restore old one */
|
||||||
pdcattr->hbrush = pdc->dclevel.pbrFill->BaseObject.hHmgr;
|
pdcattr->hbrush = pdc->dclevel.pbrFill->BaseObject.hHmgr;
|
||||||
|
|
||||||
|
/* ROS HACK, should use surf xlate */
|
||||||
|
IntUpdateBrushXlate(pdc, &pdc->rosdc.XlateBrush, pdc->dclevel.pbrFill);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ROS HACK, should use surf xlate */
|
||||||
|
pxlo = pdc->rosdc.XlateBrush;
|
||||||
|
|
||||||
/* Check for DC brush */
|
/* Check for DC brush */
|
||||||
if (pdcattr->hbrush == StockObjects[DC_BRUSH])
|
if (pdcattr->hbrush == StockObjects[DC_BRUSH])
|
||||||
{
|
{
|
||||||
|
@ -136,16 +142,25 @@ DC_vUpdateLineBrush(PDC pdc)
|
||||||
BRUSH_ShareUnlockBrush(pdc->dclevel.pbrLine);
|
BRUSH_ShareUnlockBrush(pdc->dclevel.pbrLine);
|
||||||
pdc->dclevel.pbrLine = pbrLine;
|
pdc->dclevel.pbrLine = pbrLine;
|
||||||
|
|
||||||
|
/* ROS HACK, should use surf xlate */
|
||||||
|
IntUpdateBrushXlate(pdc, &pdc->rosdc.XlatePen, pbrLine);
|
||||||
|
|
||||||
/* Update eboLine, realizing it, if needed */
|
/* Update eboLine, realizing it, if needed */
|
||||||
EBRUSHOBJ_vUpdate(&pdc->eboLine, pbrLine, pxlo);
|
EBRUSHOBJ_vUpdate(&pdc->eboLine, pbrLine, pdc->rosdc.XlatePen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Invalid pen handle, restore old one */
|
/* Invalid pen handle, restore old one */
|
||||||
pdcattr->hpen = pdc->dclevel.pbrLine->BaseObject.hHmgr;
|
pdcattr->hpen = pdc->dclevel.pbrLine->BaseObject.hHmgr;
|
||||||
|
|
||||||
|
/* ROS HACK, should use surf xlate */
|
||||||
|
IntUpdateBrushXlate(pdc, &pdc->rosdc.XlatePen, pdc->dclevel.pbrLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ROS HACK, should use surf xlate */
|
||||||
|
pxlo = pdc->rosdc.XlatePen;
|
||||||
|
|
||||||
/* Check for DC pen */
|
/* Check for DC pen */
|
||||||
if (pdcattr->hpen == StockObjects[DC_PEN])
|
if (pdcattr->hpen == StockObjects[DC_PEN])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue