Added LGPL standard comment, and copyright notices where necessary.
[wine] / graphics / metafiledrv / mapping.c
1 /*
2  * Metafile GDI mapping mode functions
3  *
4  * Copyright 1996 Alexandre Julliard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "gdi.h"
22 #include "metafiledrv.h"
23
24
25 /***********************************************************************
26  *           MFDRV_SetMapMode
27  */
28 INT MFDRV_SetMapMode( DC *dc, INT mode )
29 {
30     INT prevMode = dc->MapMode;
31     MFDRV_MetaParam1( dc, META_SETMAPMODE, mode );
32     return prevMode;
33 }
34
35
36 /***********************************************************************
37  *           MFDRV_SetViewportExt
38  */
39 BOOL MFDRV_SetViewportExt( DC *dc, INT x, INT y )
40 {
41     MFDRV_MetaParam2( dc, META_SETVIEWPORTEXT, x, y );
42     return TRUE;
43 }
44
45
46 /***********************************************************************
47  *           MFDRV_SetViewportOrg
48  */
49 BOOL MFDRV_SetViewportOrg( DC *dc, INT x, INT y )
50 {
51     MFDRV_MetaParam2( dc, META_SETVIEWPORTORG, x, y );
52     return TRUE;
53 }
54
55
56 /***********************************************************************
57  *           MFDRV_SetWindowExt
58  */
59 BOOL MFDRV_SetWindowExt( DC *dc, INT x, INT y )
60 {
61     MFDRV_MetaParam2( dc, META_SETWINDOWEXT, x, y );
62     return TRUE;
63 }
64
65
66 /***********************************************************************
67  *           MFDRV_SetWindowOrg
68  */
69 BOOL MFDRV_SetWindowOrg( DC *dc, INT x, INT y )
70 {
71     MFDRV_MetaParam2( dc, META_SETWINDOWORG, x, y );
72     return TRUE;
73 }
74
75
76 /***********************************************************************
77  *           MFDRV_OffsetViewportOrg
78  */
79 BOOL MFDRV_OffsetViewportOrg( DC *dc, INT x, INT y )
80 {
81     MFDRV_MetaParam2( dc, META_OFFSETVIEWPORTORG, x, y );
82     return TRUE;
83 }
84
85
86 /***********************************************************************
87  *           MFDRV_OffsetWindowOrg
88  */
89 BOOL MFDRV_OffsetWindowOrg( DC *dc, INT x, INT y )
90 {
91     MFDRV_MetaParam2( dc, META_OFFSETWINDOWORG, x, y );
92     return TRUE;
93 }
94
95
96 /***********************************************************************
97  *           MFDRV_ScaleViewportExt
98  */
99 BOOL MFDRV_ScaleViewportExt( DC *dc, INT xNum, INT xDenom,
100                                INT yNum, INT yDenom )
101 {
102     MFDRV_MetaParam4( dc, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom );
103     return TRUE;
104 }
105
106
107 /***********************************************************************
108  *           MFDRV_ScaleWindowExt
109  */
110 BOOL MFDRV_ScaleWindowExt( DC *dc, INT xNum, INT xDenom,
111                              INT yNum, INT yDenom )
112 {
113     MFDRV_MetaParam4( dc, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom );
114     return TRUE;
115 }
116