Some adjustments to ExtTextOut.
[wine] / graphics / psdrv / bitblt.c
1 /*
2  *      PostScript driver BitBlt, StretchBlt and PatBlt
3  *
4  * Copyright 1999  Huw D M Davies
5  *
6  */
7
8 #include "gdi.h"
9 #include "psdrv.h"
10 #include "debugtools.h"
11 #include "winbase.h"
12
13 DEFAULT_DEBUG_CHANNEL(psdrv)
14
15
16 /***********************************************************************
17  *
18  *                    PSDRV_PatBlt
19  */
20 BOOL PSDRV_PatBlt(DC *dc, INT x, INT y, INT width, INT height, DWORD dwRop)
21 {
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;
31
32     case BLACKNESS:
33     case WHITENESS:
34       {
35         PSCOLOR pscol;
36
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;
46       }
47     default:
48         FIXME("Unsupported rop %ld\n", dwRop);
49         return FALSE;
50     }
51 }