/********************************************************************** * MFDRV_FrameRgn */ BOOL CDECL MFDRV_FrameRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush, INT x, INT y ) { INT16 iRgn, iBrush; iRgn = MFDRV_CreateRegion( dev, hrgn ); if(iRgn == -1) return FALSE; iBrush = MFDRV_CreateBrushIndirect( dev, hbrush ); if(!iBrush) return FALSE; return MFDRV_MetaParam4( dev, META_FRAMEREGION, iRgn, iBrush, x, y ); }
/********************************************************************** * MFDRV_FillRgn */ BOOL CDECL MFDRV_FillRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush ) { INT16 iRgn, iBrush; iRgn = MFDRV_CreateRegion( dev, hrgn ); if(iRgn == -1) return FALSE; iBrush = MFDRV_CreateBrushIndirect( dev, hbrush ); if(!iBrush) return FALSE; return MFDRV_MetaParam2( dev, META_FILLREGION, iRgn, iBrush ); }
/*********************************************************************** * MFDRV_SelectBrush */ HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) { INT16 index; index = MFDRV_FindObject(dev, hbrush); if( index < 0 ) { index = MFDRV_CreateBrushIndirect( dev, hbrush ); if( index < 0 ) return 0; GDI_hdc_using_object(hbrush, dev->hdc); } return MFDRV_SelectObject( dev, index ) ? hbrush : 0; }
/*********************************************************************** * MFDRV_SelectBrush */ HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, const BITMAPINFO *info, void *bits, UINT usage ) { INT16 index; index = MFDRV_FindObject(dev, hbrush); if( index < 0 ) { index = MFDRV_CreateBrushIndirect( dev, hbrush ); if( index < 0 ) return 0; GDI_hdc_using_object(hbrush, dev->hdc); } return MFDRV_SelectObject( dev, index ) ? hbrush : 0; }
/*********************************************************************** * MFDRV_SelectBrush */ HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) { METAFILEDRV_PDEVICE *physDev = (METAFILEDRV_PDEVICE *)dev; INT16 index; index = MFDRV_FindObject(dev, hbrush); if( index < 0 ) { index = MFDRV_CreateBrushIndirect( dev, hbrush ); if( index < 0 ) return 0; GDI_hdc_using_object(hbrush, physDev->hdc); } return MFDRV_SelectObject( dev, index ) ? hbrush : HGDI_ERROR; }