mapping.c 3.56 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3 4
/*
 * Metafile GDI mapping mode functions
 *
 * Copyright 1996 Alexandre Julliard
5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Alexandre Julliard's avatar
Alexandre Julliard committed
19 20
 */

21 22 23 24
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
25
#include "gdi_private.h"
26
#include "mfdrv/metafiledrv.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
27 28 29 30 31


/***********************************************************************
 *           MFDRV_SetMapMode
 */
32
INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode )
Alexandre Julliard's avatar
Alexandre Julliard committed
33
{
34 35 36
    if(!MFDRV_MetaParam1( dev, META_SETMAPMODE, mode ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
37 38 39 40 41 42
}


/***********************************************************************
 *           MFDRV_SetViewportExt
 */
43
INT CDECL MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y )
Alexandre Julliard's avatar
Alexandre Julliard committed
44
{
45 46 47
    if(!MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
48 49 50 51 52 53
}


/***********************************************************************
 *           MFDRV_SetViewportOrg
 */
54
INT CDECL MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
Alexandre Julliard's avatar
Alexandre Julliard committed
55
{
56 57 58
    if(!MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
59 60 61 62 63 64
}


/***********************************************************************
 *           MFDRV_SetWindowExt
 */
65
INT CDECL MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y )
Alexandre Julliard's avatar
Alexandre Julliard committed
66
{
67 68 69
    if(!MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
70 71 72 73 74 75
}


/***********************************************************************
 *           MFDRV_SetWindowOrg
 */
76
INT CDECL MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
Alexandre Julliard's avatar
Alexandre Julliard committed
77
{
78 79 80
    if(!MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
81 82 83 84 85 86
}


/***********************************************************************
 *           MFDRV_OffsetViewportOrg
 */
87
INT CDECL MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y )
Alexandre Julliard's avatar
Alexandre Julliard committed
88
{
89 90 91
    if(!MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
92 93 94 95 96 97
}


/***********************************************************************
 *           MFDRV_OffsetWindowOrg
 */
98
INT CDECL MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y )
Alexandre Julliard's avatar
Alexandre Julliard committed
99
{
100 101 102
    if(!MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
103 104 105 106 107 108
}


/***********************************************************************
 *           MFDRV_ScaleViewportExt
 */
109
INT CDECL MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
Alexandre Julliard's avatar
Alexandre Julliard committed
110
{
111 112 113
    if(!MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
114 115 116 117 118 119
}


/***********************************************************************
 *           MFDRV_ScaleWindowExt
 */
120
INT CDECL MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
Alexandre Julliard's avatar
Alexandre Julliard committed
121
{
122 123 124
    if(!MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom ))
        return FALSE;
    return GDI_NO_MORE_WORK;
Alexandre Julliard's avatar
Alexandre Julliard committed
125
}