1999-04-25 11:24:23 +02:00
|
|
|
/*
|
|
|
|
* MetaFile driver DC value functions
|
|
|
|
*
|
|
|
|
* Copyright 1999 Huw D M Davies
|
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1999-04-25 11:24:23 +02:00
|
|
|
*/
|
|
|
|
|
2002-03-27 22:13:40 +01:00
|
|
|
#include "mfdrv/metafiledrv.h"
|
1999-04-25 11:24:23 +02:00
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SaveDC( PHYSDEV dev )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2002-03-28 23:22:05 +01:00
|
|
|
return MFDRV_MetaParam0( dev, META_SAVEDC );
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_RestoreDC( PHYSDEV dev, INT level )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2002-03-28 23:22:05 +01:00
|
|
|
return MFDRV_MetaParam1( dev, META_RESTOREDC, level );
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
UINT CDECL MFDRV_SetTextAlign( PHYSDEV dev, UINT align )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-10 21:58:47 +01:00
|
|
|
return MFDRV_MetaParam2( dev, META_SETTEXTALIGN, HIWORD(align), LOWORD(align)) ? align : GDI_ERROR;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SetBkMode( PHYSDEV dev, INT mode )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-10 21:58:47 +01:00
|
|
|
return MFDRV_MetaParam1( dev, META_SETBKMODE, (WORD)mode) ? mode : 0;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
COLORREF CDECL MFDRV_SetBkColor( PHYSDEV dev, COLORREF color )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2(dev, META_SETBKCOLOR, HIWORD(color), LOWORD(color)) ? color : CLR_INVALID;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
COLORREF CDECL MFDRV_SetTextColor( PHYSDEV dev, COLORREF color )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2(dev, META_SETTEXTCOLOR, HIWORD(color), LOWORD(color)) ? color : CLR_INVALID;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SetROP2( PHYSDEV dev, INT rop )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-10 21:58:47 +01:00
|
|
|
return MFDRV_MetaParam1( dev, META_SETROP2, (WORD)rop) ? rop : 0;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SetRelAbs( PHYSDEV dev, INT mode )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-10 21:58:47 +01:00
|
|
|
return MFDRV_MetaParam1( dev, META_SETRELABS, (WORD)mode) ? mode : 0;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SetPolyFillMode( PHYSDEV dev, INT mode )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-10 21:58:47 +01:00
|
|
|
return MFDRV_MetaParam1( dev, META_SETPOLYFILLMODE, (WORD)mode) ? mode : 0;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SetStretchBltMode( PHYSDEV dev, INT mode )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-10 21:58:47 +01:00
|
|
|
return MFDRV_MetaParam1( dev, META_SETSTRETCHBLTMODE, (WORD)mode) ? mode : 0;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-11 12:03:41 +01:00
|
|
|
return MFDRV_MetaParam4( dev, META_INTERSECTCLIPRECT, left, top, right, bottom );
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-11 12:03:41 +01:00
|
|
|
return MFDRV_MetaParam4( dev, META_EXCLUDECLIPRECT, left, top, right, bottom );
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2002-03-28 23:22:05 +01:00
|
|
|
return MFDRV_MetaParam2( dev, META_OFFSETCLIPRGN, x, y );
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam1( dev, META_SETMAPMODE, mode );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_SetViewportExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
return MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_SetTextJustification( PHYSDEV dev, INT extra, INT breaks )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2002-03-28 23:22:05 +01:00
|
|
|
return MFDRV_MetaParam2( dev, META_SETTEXTJUSTIFICATION, extra, breaks );
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL MFDRV_SetTextCharacterExtra( PHYSDEV dev, INT extra )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-10 21:58:47 +01:00
|
|
|
return MFDRV_MetaParam1( dev, META_SETTEXTCHAREXTRA, extra ) ? extra : 0x80000000;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
DWORD CDECL MFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags )
|
1999-04-25 11:24:23 +02:00
|
|
|
{
|
2011-03-11 12:03:41 +01:00
|
|
|
return MFDRV_MetaParam2( dev, META_SETMAPPERFLAGS, HIWORD(flags), LOWORD(flags) ) ? flags : GDI_ERROR;
|
1999-04-25 11:24:23 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_AbortPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_BeginPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_CloseFigure( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_EndPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_FillPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_FlattenPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_SelectClipPath( PHYSDEV dev, INT iMode )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_StrokeAndFillPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_StrokePath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL MFDRV_WidenPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2011-03-10 20:22:22 +01:00
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
COLORREF CDECL MFDRV_SetDCBrushColor( PHYSDEV dev, COLORREF color )
|
2011-03-10 20:22:22 +01:00
|
|
|
{
|
|
|
|
return CLR_INVALID;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
COLORREF CDECL MFDRV_SetDCPenColor( PHYSDEV dev, COLORREF color )
|
2011-03-10 20:22:22 +01:00
|
|
|
{
|
|
|
|
return CLR_INVALID;
|
|
|
|
}
|