Release 980628
[wine/gsoc-2012-control.git] / graphics / psdrv / graphics.c
blobebc4c2ee6a2f3f122e5f58c21d0a416b79fad14b
1 /*
2 * Postscript driver graphics functions
4 * Copyright 1998 Huw D M Davies
6 * Not much here yet...
7 */
8 #include <string.h>
9 #include "windows.h"
10 #include "psdrv.h"
11 #include "debug.h"
12 #include "print.h"
14 /**********************************************************************
15 * PSDRV_MoveToEx
17 BOOL32 PSDRV_MoveToEx(DC *dc, INT32 x, INT32 y, LPPOINT32 pt)
19 TRACE(psdrv, "%d %d\n", x, y);
20 if (pt)
22 pt->x = dc->w.CursPosX;
23 pt->y = dc->w.CursPosY;
25 dc->w.CursPosX = x;
26 dc->w.CursPosY = y;
28 return PSDRV_WriteMoveTo(dc, XLPTODP(dc, x), YLPTODP(dc, y));
31 /***********************************************************************
32 * PSDRV_LineTo
34 BOOL32 PSDRV_LineTo(DC *dc, INT32 x, INT32 y)
36 TRACE(psdrv, "%d %d\n", x, y);
38 PSDRV_WriteLineTo(dc, XLPTODP(dc, x), YLPTODP(dc, y));
39 PSDRV_WriteStroke(dc);
41 dc->w.CursPosX = x;
42 dc->w.CursPosY = y;
43 return TRUE;
46 /***********************************************************************
47 * PSDRV_Rectangle
49 BOOL32 PSDRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right,
50 INT32 bottom)
52 INT32 width = XLSTODS(dc, right - left);
53 INT32 height = YLSTODS(dc, bottom - top);
56 TRACE(psdrv, "%d %d - %d %d\n", left, top, right, bottom);
58 PSDRV_WriteRectangle(dc, XLPTODP(dc, left), YLPTODP(dc, top),
59 width, height);
60 PSDRV_WriteStroke(dc);
61 return TRUE;
65 /***********************************************************************
66 * PSDRV_Ellipse
68 BOOL32 PSDRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
70 TRACE(psdrv, "%d %d - %d %d\n", left, top, right, bottom);
72 return TRUE;