Fixed COORD structure definition.
[wine/multimedia.git] / graphics / psdrv / bitblt.c
blobe4752e2eae348a2d2072c39d5221bd126fd88eda
1 /*
2 * PostScript driver BitBlt, StretchBlt and PatBlt
4 * Copyright 1999 Huw D M Davies
6 */
8 #include "gdi.h"
9 #include "psdrv.h"
10 #include "debugtools.h"
11 #include "winbase.h"
13 DEFAULT_DEBUG_CHANNEL(psdrv)
16 /***********************************************************************
18 * PSDRV_PatBlt
20 BOOL PSDRV_PatBlt(DC *dc, INT x, INT y, INT width, INT height, DWORD dwRop)
22 PSDRV_PDEVICE *physDev = (PSDRV_PDEVICE *)dc->physDev;
23 switch(dwRop) {
24 case PATCOPY:
25 PSDRV_WriteGSave(dc);
26 PSDRV_WriteRectangle(dc, XLPTODP(dc, x), YLPTODP(dc, y),
27 XLSTODS(dc, width), YLSTODS(dc, height));
28 PSDRV_Brush(dc, FALSE);
29 PSDRV_WriteGRestore(dc);
30 return TRUE;
32 case BLACKNESS:
33 case WHITENESS:
35 PSCOLOR pscol;
37 PSDRV_WriteGSave(dc);
38 PSDRV_WriteRectangle(dc, XLPTODP(dc, x), YLPTODP(dc, y),
39 XLSTODS(dc, width), YLSTODS(dc, height));
40 PSDRV_CreateColor( physDev, &pscol, (dwRop == BLACKNESS) ?
41 RGB(0,0,0) : RGB(0xff,0xff,0xff) );
42 PSDRV_WriteSetColor(dc, &pscol);
43 PSDRV_WriteFill(dc);
44 PSDRV_WriteGRestore(dc);
45 return TRUE;
47 default:
48 FIXME("Unsupported rop %ld\n", dwRop);
49 return FALSE;