Commit 7d1dd28d authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Move all the metafile DC setting functions to mfdrv/dc.c

parent 47dee8bd
...@@ -32,7 +32,6 @@ C_SRCS = \ ...@@ -32,7 +32,6 @@ C_SRCS = \
mfdrv/dc.c \ mfdrv/dc.c \
mfdrv/graphics.c \ mfdrv/graphics.c \
mfdrv/init.c \ mfdrv/init.c \
mfdrv/mapping.c \
mfdrv/objects.c \ mfdrv/objects.c \
mfdrv/text.c \ mfdrv/text.c \
opengl.c \ opengl.c \
......
...@@ -40,6 +40,16 @@ INT CDECL MFDRV_SetBkMode( PHYSDEV dev, INT mode ) ...@@ -40,6 +40,16 @@ INT CDECL MFDRV_SetBkMode( PHYSDEV dev, INT mode )
return MFDRV_MetaParam1( dev, META_SETBKMODE, (WORD)mode) ? mode : 0; return MFDRV_MetaParam1( dev, META_SETBKMODE, (WORD)mode) ? mode : 0;
} }
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;
}
INT CDECL MFDRV_SetROP2( PHYSDEV dev, INT rop ) INT CDECL MFDRV_SetROP2( PHYSDEV dev, INT rop )
{ {
return MFDRV_MetaParam1( dev, META_SETROP2, (WORD)rop) ? rop : 0; return MFDRV_MetaParam1( dev, META_SETROP2, (WORD)rop) ? rop : 0;
...@@ -62,14 +72,12 @@ INT CDECL MFDRV_SetStretchBltMode( PHYSDEV dev, INT mode ) ...@@ -62,14 +72,12 @@ INT CDECL MFDRV_SetStretchBltMode( PHYSDEV dev, INT mode )
INT CDECL MFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) INT CDECL MFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
{ {
return MFDRV_MetaParam4( dev, META_INTERSECTCLIPRECT, left, top, right, return MFDRV_MetaParam4( dev, META_INTERSECTCLIPRECT, left, top, right, bottom );
bottom );
} }
INT CDECL MFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) INT CDECL MFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
{ {
return MFDRV_MetaParam4( dev, META_EXCLUDECLIPRECT, left, top, right, return MFDRV_MetaParam4( dev, META_EXCLUDECLIPRECT, left, top, right, bottom );
bottom );
} }
INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
...@@ -77,6 +85,51 @@ INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) ...@@ -77,6 +85,51 @@ INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
return MFDRV_MetaParam2( dev, META_OFFSETCLIPRGN, x, y ); return MFDRV_MetaParam2( dev, META_OFFSETCLIPRGN, x, y );
} }
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 );
}
BOOL CDECL MFDRV_SetTextJustification( PHYSDEV dev, INT extra, INT breaks ) BOOL CDECL MFDRV_SetTextJustification( PHYSDEV dev, INT extra, INT breaks )
{ {
return MFDRV_MetaParam2( dev, META_SETTEXTJUSTIFICATION, extra, breaks ); return MFDRV_MetaParam2( dev, META_SETTEXTJUSTIFICATION, extra, breaks );
...@@ -89,8 +142,7 @@ INT CDECL MFDRV_SetTextCharacterExtra( PHYSDEV dev, INT extra ) ...@@ -89,8 +142,7 @@ INT CDECL MFDRV_SetTextCharacterExtra( PHYSDEV dev, INT extra )
DWORD CDECL MFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags ) DWORD CDECL MFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags )
{ {
return MFDRV_MetaParam2( dev, META_SETMAPPERFLAGS, HIWORD(flags), return MFDRV_MetaParam2( dev, META_SETMAPPERFLAGS, HIWORD(flags), LOWORD(flags) ) ? flags : GDI_ERROR;
LOWORD(flags) ) ? flags : GDI_ERROR;
} }
BOOL CDECL MFDRV_AbortPath( PHYSDEV dev ) BOOL CDECL MFDRV_AbortPath( PHYSDEV dev )
......
...@@ -430,28 +430,6 @@ INT CDECL MFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode ) ...@@ -430,28 +430,6 @@ INT CDECL MFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
/********************************************************************** /**********************************************************************
* MFDRV_SetBkColor
*/
COLORREF CDECL
MFDRV_SetBkColor( PHYSDEV dev, COLORREF color )
{
return MFDRV_MetaParam2(dev, META_SETBKCOLOR, HIWORD(color),
LOWORD(color)) ? color : CLR_INVALID;
}
/**********************************************************************
* MFDRV_SetTextColor
*/
COLORREF CDECL
MFDRV_SetTextColor( PHYSDEV dev, COLORREF color )
{
return MFDRV_MetaParam2(dev, META_SETTEXTCOLOR, HIWORD(color),
LOWORD(color)) ? color : CLR_INVALID;
}
/**********************************************************************
* MFDRV_PolyBezier * MFDRV_PolyBezier
* Since MetaFiles don't record Beziers and they don't even record * Since MetaFiles don't record Beziers and they don't even record
* approximations to them using lines, we need this stub function. * approximations to them using lines, we need this stub function.
......
/*
* Metafile GDI mapping mode functions
*
* Copyright 1996 Alexandre Julliard
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "gdi_private.h"
#include "mfdrv/metafiledrv.h"
/***********************************************************************
* MFDRV_SetMapMode
*/
INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode )
{
return MFDRV_MetaParam1( dev, META_SETMAPMODE, mode );
}
/***********************************************************************
* MFDRV_SetViewportExtEx
*/
BOOL CDECL MFDRV_SetViewportExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
{
return MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y );
}
/***********************************************************************
* MFDRV_SetViewportOrgEx
*/
BOOL CDECL MFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
return MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y );
}
/***********************************************************************
* MFDRV_SetWindowExtEx
*/
BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
{
return MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y );
}
/***********************************************************************
* MFDRV_SetWindowOrgEx
*/
BOOL CDECL MFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
return MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y );
}
/***********************************************************************
* MFDRV_OffsetViewportOrgEx
*/
BOOL CDECL MFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
return MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y );
}
/***********************************************************************
* MFDRV_OffsetWindowOrgEx
*/
BOOL CDECL MFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
return MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y );
}
/***********************************************************************
* MFDRV_ScaleViewportExtEx
*/
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 );
}
/***********************************************************************
* MFDRV_ScaleWindowExtEx
*/
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 );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment