- Implement URL_ESCAPE_SEGEMENT_ONLY, URL_ESCAPE_PERCENT,
[wine.git] / graphics / win16drv / brush.c
blob48cbb4c3a526d641481a70e1ebe84165c622d3a4
1 /*
2 * GDI brush objects - win16drv
4 * Copyright 1997 John Harvey
5 */
7 #include <stdlib.h>
8 #include "win16drv.h"
9 #include "heap.h"
10 #include "debugtools.h"
12 DEFAULT_DEBUG_CHANNEL(win16drv);
14 HBRUSH WIN16DRV_BRUSH_SelectObject( DC * dc, HBRUSH hbrush )
16 WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dc->physDev;
17 HBRUSH16 prevHandle = dc->hBrush;
18 int nSize;
19 LOGBRUSH16 lBrush16;
21 if (!GetObject16( hbrush, sizeof(lBrush16), &lBrush16 )) return 0;
23 dc->hBrush = hbrush;
24 if ( physDev->BrushInfo )
26 TRACE("UnRealizing BrushInfo\n");
27 nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, -DRVOBJ_BRUSH,
28 physDev->BrushInfo,
29 physDev->BrushInfo, 0);
31 else
33 nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_BRUSH,
34 &lBrush16, 0, 0);
35 physDev->BrushInfo = SEGPTR_ALLOC( nSize );
39 nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_BRUSH,
40 &lBrush16,
41 physDev->BrushInfo,
42 win16drv_SegPtr_TextXForm);
44 return prevHandle;