2 * Enhanced MetaFile driver mapping functions
4 * Copyright 1999 Huw D M Davies
6 #include "enhmetafiledrv.h"
8 BOOL
EMFDRV_SetViewportExt( DC
*dc
, INT cx
, INT cy
)
10 EMRSETVIEWPORTEXTEX emr
;
12 emr
.emr
.iType
= EMR_SETVIEWPORTEXTEX
;
13 emr
.emr
.nSize
= sizeof(emr
);
14 emr
.szlExtent
.cx
= cx
;
15 emr
.szlExtent
.cy
= cy
;
17 return EMFDRV_WriteRecord( dc
, &emr
.emr
);
20 BOOL
EMFDRV_SetWindowExt( DC
*dc
, INT cx
, INT cy
)
22 EMRSETWINDOWEXTEX emr
;
24 emr
.emr
.iType
= EMR_SETWINDOWEXTEX
;
25 emr
.emr
.nSize
= sizeof(emr
);
26 emr
.szlExtent
.cx
= cx
;
27 emr
.szlExtent
.cy
= cy
;
29 return EMFDRV_WriteRecord( dc
, &emr
.emr
);
32 BOOL
EMFDRV_SetViewportOrg( DC
*dc
, INT x
, INT y
)
34 EMRSETVIEWPORTORGEX emr
;
36 emr
.emr
.iType
= EMR_SETVIEWPORTORGEX
;
37 emr
.emr
.nSize
= sizeof(emr
);
41 return EMFDRV_WriteRecord( dc
, &emr
.emr
);
44 BOOL
EMFDRV_SetWindowOrg( DC
*dc
, INT x
, INT y
)
46 EMRSETWINDOWORGEX emr
;
48 emr
.emr
.iType
= EMR_SETWINDOWORGEX
;
49 emr
.emr
.nSize
= sizeof(emr
);
53 return EMFDRV_WriteRecord( dc
, &emr
.emr
);
56 BOOL
EMFDRV_ScaleViewportExt( DC
*dc
, INT xNum
, INT xDenom
, INT yNum
,
59 EMRSCALEVIEWPORTEXTEX emr
;
61 emr
.emr
.iType
= EMR_SCALEVIEWPORTEXTEX
;
62 emr
.emr
.nSize
= sizeof(emr
);
68 return EMFDRV_WriteRecord( dc
, &emr
.emr
);
71 BOOL
EMFDRV_ScaleWindowExt( DC
*dc
, INT xNum
, INT xDenom
, INT yNum
,
74 EMRSCALEWINDOWEXTEX emr
;
76 emr
.emr
.iType
= EMR_SCALEWINDOWEXTEX
;
77 emr
.emr
.nSize
= sizeof(emr
);
83 return EMFDRV_WriteRecord( dc
, &emr
.emr
);