dc.c 5.34 KB
Newer Older
1 2 3 4 5
/*
 * MetaFile driver DC value functions
 *
 * Copyright 1999 Huw D M Davies
 *
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
19 20
 */

21
#include "mfdrv/metafiledrv.h"
22

23
INT  CDECL MFDRV_SaveDC( PHYSDEV dev )
24
{
25
    return MFDRV_MetaParam0( dev, META_SAVEDC );
26 27
}

28
BOOL  CDECL MFDRV_RestoreDC( PHYSDEV dev, INT level )
29
{
30
    return MFDRV_MetaParam1( dev, META_RESTOREDC, level );
31 32
}

33
UINT  CDECL MFDRV_SetTextAlign( PHYSDEV dev, UINT align )
34
{
35
    return MFDRV_MetaParam2( dev, META_SETTEXTALIGN, HIWORD(align), LOWORD(align)) ? align : GDI_ERROR;
36 37
}

38
INT  CDECL MFDRV_SetBkMode( PHYSDEV dev, INT mode )
39
{
40
    return MFDRV_MetaParam1( dev, META_SETBKMODE, (WORD)mode) ? mode : 0;
41 42
}

43 44 45 46 47 48 49 50 51 52
COLORREF CDECL MFDRV_SetBkColor( PHYSDEV dev, COLORREF color )
{
    return MFDRV_MetaParam2(dev, META_SETBKCOLOR, HIWORD(color), LOWORD(color)) ? color : CLR_INVALID;
}

COLORREF CDECL MFDRV_SetTextColor( PHYSDEV dev, COLORREF color )
{
    return MFDRV_MetaParam2(dev, META_SETTEXTCOLOR, HIWORD(color), LOWORD(color)) ? color : CLR_INVALID;
}

53
INT  CDECL MFDRV_SetROP2( PHYSDEV dev, INT rop )
54
{
55
    return MFDRV_MetaParam1( dev, META_SETROP2, (WORD)rop) ? rop : 0;
56 57
}

58
INT  CDECL MFDRV_SetRelAbs( PHYSDEV dev, INT mode )
59
{
60
    return MFDRV_MetaParam1( dev, META_SETRELABS, (WORD)mode) ? mode : 0;
61 62
}

63
INT  CDECL MFDRV_SetPolyFillMode( PHYSDEV dev, INT mode )
64
{
65
    return MFDRV_MetaParam1( dev, META_SETPOLYFILLMODE, (WORD)mode) ? mode : 0;
66 67
}

68
INT  CDECL MFDRV_SetStretchBltMode( PHYSDEV dev, INT mode )
69
{
70
    return MFDRV_MetaParam1( dev, META_SETSTRETCHBLTMODE, (WORD)mode) ? mode : 0;
71 72
}

73
INT  CDECL MFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
74
{
75
    return MFDRV_MetaParam4( dev, META_INTERSECTCLIPRECT, left, top, right, bottom );
76 77
}

78
INT  CDECL MFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
79
{
80
    return MFDRV_MetaParam4( dev, META_EXCLUDECLIPRECT, left, top, right, bottom );
81 82
}

83
INT  CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
84
{
85
    return MFDRV_MetaParam2( dev, META_OFFSETCLIPRGN, x, y );
86 87
}

88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode )
{
    return MFDRV_MetaParam1( dev, META_SETMAPMODE, mode );
}

BOOL CDECL MFDRV_SetViewportExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
{
    return MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y );
}

BOOL CDECL MFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
    return MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y );
}

BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
{
    return MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y );
}

BOOL CDECL MFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
    return MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y );
}

BOOL CDECL MFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
    return MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y );
}

BOOL CDECL MFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
    return MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y );
}

BOOL CDECL MFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
{
    return MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom );
}

BOOL CDECL MFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
{
    return MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom );
}

133
BOOL CDECL MFDRV_SetTextJustification( PHYSDEV dev, INT extra, INT breaks )
134
{
135
    return MFDRV_MetaParam2( dev, META_SETTEXTJUSTIFICATION, extra, breaks );
136 137
}

138
INT  CDECL MFDRV_SetTextCharacterExtra( PHYSDEV dev, INT extra )
139
{
140
    return MFDRV_MetaParam1( dev, META_SETTEXTCHAREXTRA, extra ) ? extra : 0x80000000;
141 142
}

143
DWORD  CDECL MFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags )
144
{
145
    return MFDRV_MetaParam2( dev, META_SETMAPPERFLAGS, HIWORD(flags), LOWORD(flags) ) ? flags : GDI_ERROR;
146 147
}

148
BOOL  CDECL MFDRV_AbortPath( PHYSDEV dev )
149 150 151 152
{
    return FALSE;
}

153
BOOL  CDECL MFDRV_BeginPath( PHYSDEV dev )
154 155 156 157
{
    return FALSE;
}

158
BOOL  CDECL MFDRV_CloseFigure( PHYSDEV dev )
159 160 161 162
{
    return FALSE;
}

163
BOOL  CDECL MFDRV_EndPath( PHYSDEV dev )
164 165 166 167
{
    return FALSE;
}

168
BOOL  CDECL MFDRV_FillPath( PHYSDEV dev )
169 170 171 172
{
    return FALSE;
}

173
BOOL  CDECL MFDRV_FlattenPath( PHYSDEV dev )
174 175 176 177
{
    return FALSE;
}

178
BOOL  CDECL MFDRV_SelectClipPath( PHYSDEV dev, INT iMode )
179 180 181 182
{
    return FALSE;
}

183
BOOL  CDECL MFDRV_StrokeAndFillPath( PHYSDEV dev )
184 185 186 187
{
    return FALSE;
}

188
BOOL  CDECL MFDRV_StrokePath( PHYSDEV dev )
189 190 191 192
{
    return FALSE;
}

193
BOOL  CDECL MFDRV_WidenPath( PHYSDEV dev )
194 195 196
{
    return FALSE;
}
197 198 199 200 201 202 203 204 205 206

COLORREF CDECL MFDRV_SetDCBrushColor( PHYSDEV dev, COLORREF color )
{
    return CLR_INVALID;
}

COLORREF CDECL MFDRV_SetDCPenColor( PHYSDEV dev, COLORREF color )
{
    return CLR_INVALID;
}