2 * GDI brush objects - win16drv
4 * Copyright 1997 John Harvey
13 DEFAULT_DEBUG_CHANNEL(win16drv)
15 HBRUSH WIN16DRV_BRUSH_SelectObject( DC * dc, HBRUSH hbrush,
18 WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
19 HBRUSH16 prevHandle = dc->w.hBrush;
22 dc->w.hBrush = hbrush;
23 lBrush16.lbStyle = brush->logbrush.lbStyle;
24 lBrush16.lbColor = brush->logbrush.lbColor;
25 lBrush16.lbHatch = brush->logbrush.lbHatch;
28 if ( physDev->BrushInfo )
30 TRACE(win16drv, "UnRealizing BrushInfo\n");
31 nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, -DRVOBJ_BRUSH,
33 physDev->BrushInfo, 0);
37 nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_BRUSH,
39 physDev->BrushInfo = SEGPTR_ALLOC( nSize );
43 nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_BRUSH,
46 win16drv_SegPtr_TextXForm);