2 * Enhanced MetaFile driver mapping functions
4 * Copyright 1999 Huw D M Davies
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.
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.
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
20 #include "enhmetafiledrv.h"
22 BOOL EMFDRV_SetViewportExt( DC *dc, INT cx, INT cy )
24 EMRSETVIEWPORTEXTEX emr;
26 emr.emr.iType = EMR_SETVIEWPORTEXTEX;
27 emr.emr.nSize = sizeof(emr);
28 emr.szlExtent.cx = cx;
29 emr.szlExtent.cy = cy;
31 return EMFDRV_WriteRecord( dc, &emr.emr );
34 BOOL EMFDRV_SetWindowExt( DC *dc, INT cx, INT cy )
36 EMRSETWINDOWEXTEX emr;
38 emr.emr.iType = EMR_SETWINDOWEXTEX;
39 emr.emr.nSize = sizeof(emr);
40 emr.szlExtent.cx = cx;
41 emr.szlExtent.cy = cy;
43 return EMFDRV_WriteRecord( dc, &emr.emr );
46 BOOL EMFDRV_SetViewportOrg( DC *dc, INT x, INT y )
48 EMRSETVIEWPORTORGEX emr;
50 emr.emr.iType = EMR_SETVIEWPORTORGEX;
51 emr.emr.nSize = sizeof(emr);
55 return EMFDRV_WriteRecord( dc, &emr.emr );
58 BOOL EMFDRV_SetWindowOrg( DC *dc, INT x, INT y )
60 EMRSETWINDOWORGEX emr;
62 emr.emr.iType = EMR_SETWINDOWORGEX;
63 emr.emr.nSize = sizeof(emr);
67 return EMFDRV_WriteRecord( dc, &emr.emr );
70 BOOL EMFDRV_ScaleViewportExt( DC *dc, INT xNum, INT xDenom, INT yNum,
73 EMRSCALEVIEWPORTEXTEX emr;
75 emr.emr.iType = EMR_SCALEVIEWPORTEXTEX;
76 emr.emr.nSize = sizeof(emr);
82 return EMFDRV_WriteRecord( dc, &emr.emr );
85 BOOL EMFDRV_ScaleWindowExt( DC *dc, INT xNum, INT xDenom, INT yNum,
88 EMRSCALEWINDOWEXTEX emr;
90 emr.emr.iType = EMR_SCALEWINDOWEXTEX;
91 emr.emr.nSize = sizeof(emr);
97 return EMFDRV_WriteRecord( dc, &emr.emr );