gdi32: Add support for DC pens.
This commit is contained in:
parent
842d49939d
commit
15ef394159
|
@ -216,7 +216,7 @@ const DC_FUNCTIONS dib_driver =
|
|||
NULL, /* pSetBkColor */
|
||||
NULL, /* pSetBkMode */
|
||||
NULL, /* pSetDCBrushColor */
|
||||
NULL, /* pSetDCPenColor */
|
||||
dibdrv_SetDCPenColor, /* pSetDCPenColor */
|
||||
NULL, /* pSetDIBColorTable */
|
||||
NULL, /* pSetDIBits */
|
||||
NULL, /* pSetDIBitsToDevice */
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
extern HPEN CDECL dibdrv_SelectPen( PHYSDEV dev, HPEN hpen ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline dibdrv_physdev *get_dibdrv_pdev( PHYSDEV dev )
|
||||
{
|
||||
|
|
|
@ -56,6 +56,9 @@ HPEN CDECL dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
|
|||
HeapFree( GetProcessHeap(), 0, elp );
|
||||
}
|
||||
|
||||
if (hpen == GetStockObject( DC_PEN ))
|
||||
logpen.lopnColor = GetDCPenColor( dev->hdc );
|
||||
|
||||
pdev->pen_color = pdev->dib.funcs->colorref_to_pixel(&pdev->dib, logpen.lopnColor);
|
||||
|
||||
pdev->defer |= DEFER_PEN;
|
||||
|
@ -73,3 +76,17 @@ HPEN CDECL dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
|
|||
|
||||
return next->funcs->pSelectPen( next, hpen );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* dibdrv_SetDCPenColor
|
||||
*/
|
||||
COLORREF CDECL dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color )
|
||||
{
|
||||
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDCPenColor );
|
||||
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
|
||||
|
||||
if (GetCurrentObject(dev->hdc, OBJ_PEN) == GetStockObject( DC_PEN ))
|
||||
pdev->pen_color = pdev->dib.funcs->colorref_to_pixel(&pdev->dib, color);
|
||||
|
||||
return next->funcs->pSetDCPenColor( next, color );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue