1999-05-02 12:15:16 +02:00
|
|
|
/*
|
|
|
|
* Enhanced MetaFile driver dc value functions
|
|
|
|
*
|
|
|
|
* Copyright 1999 Huw D M Davies
|
2016-06-21 07:38:19 +02:00
|
|
|
* Copyright 2016 Alexandre Julliard
|
1999-05-02 12:15:16 +02:00
|
|
|
*
|
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-05-02 12:15:16 +02:00
|
|
|
*/
|
2002-03-10 00:29:33 +01:00
|
|
|
|
2016-06-21 07:38:19 +02:00
|
|
|
#include <assert.h>
|
2002-03-27 22:13:40 +01:00
|
|
|
#include "enhmfdrv/enhmetafiledrv.h"
|
1999-05-02 12:15:16 +02:00
|
|
|
|
2016-06-21 07:38:19 +02:00
|
|
|
/* get the emf physdev from the path physdev */
|
|
|
|
static inline PHYSDEV get_emfdev( PHYSDEV path )
|
|
|
|
{
|
|
|
|
return &CONTAINING_RECORD( path, EMFDRV_PDEVICE, pathdev )->dev;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct gdi_dc_funcs emfpath_driver;
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_SaveDC( PHYSDEV dev )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
2011-03-15 20:17:58 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSaveDC );
|
|
|
|
INT ret = next->funcs->pSaveDC( next );
|
2009-04-07 20:32:58 +02:00
|
|
|
|
|
|
|
if (ret)
|
|
|
|
{
|
2011-03-15 20:17:58 +01:00
|
|
|
EMRSAVEDC emr;
|
2009-04-07 20:32:58 +02:00
|
|
|
emr.emr.iType = EMR_SAVEDC;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
EMFDRV_WriteRecord( dev, &emr.emr );
|
|
|
|
}
|
|
|
|
return ret;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_RestoreDC( PHYSDEV dev, INT level )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
2011-03-15 20:17:58 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pRestoreDC );
|
2016-06-21 07:52:43 +02:00
|
|
|
EMFDRV_PDEVICE* physDev = get_emf_physdev( dev );
|
2016-07-29 16:09:36 +02:00
|
|
|
DC *dc = get_physdev_dc( dev );
|
1999-05-02 12:15:16 +02:00
|
|
|
EMRRESTOREDC emr;
|
2009-04-07 20:41:41 +02:00
|
|
|
BOOL ret;
|
2003-10-07 05:32:28 +02:00
|
|
|
|
1999-05-02 12:15:16 +02:00
|
|
|
emr.emr.iType = EMR_RESTOREDC;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
2005-10-31 11:05:52 +01:00
|
|
|
|
|
|
|
if (level < 0)
|
|
|
|
emr.iRelative = level;
|
|
|
|
else
|
2007-09-12 20:23:03 +02:00
|
|
|
emr.iRelative = level - dc->saveLevel - 1;
|
2005-10-31 11:05:52 +01:00
|
|
|
|
2009-04-07 20:41:41 +02:00
|
|
|
physDev->restoring++;
|
2011-03-15 20:17:58 +01:00
|
|
|
ret = next->funcs->pRestoreDC( next, level );
|
2009-04-07 20:41:41 +02:00
|
|
|
physDev->restoring--;
|
2005-10-31 11:05:52 +01:00
|
|
|
|
2009-04-07 20:41:41 +02:00
|
|
|
if (ret) EMFDRV_WriteRecord( dev, &emr.emr );
|
|
|
|
return ret;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
UINT CDECL EMFDRV_SetTextAlign( PHYSDEV dev, UINT align )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
|
|
|
EMRSETTEXTALIGN emr;
|
|
|
|
emr.emr.iType = EMR_SETTEXTALIGN;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = align;
|
2011-03-10 21:58:47 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? align : GDI_ERROR;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_SetTextJustification(PHYSDEV dev, INT nBreakExtra, INT nBreakCount)
|
2003-10-10 02:06:59 +02:00
|
|
|
{
|
|
|
|
EMRSETTEXTJUSTIFICATION emr;
|
|
|
|
emr.emr.iType = EMR_SETTEXTJUSTIFICATION;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.nBreakExtra = nBreakExtra;
|
|
|
|
emr.nBreakCount = nBreakCount;
|
|
|
|
return EMFDRV_WriteRecord(dev, &emr.emr);
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_SetBkMode( PHYSDEV dev, INT mode )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
|
|
|
EMRSETBKMODE emr;
|
|
|
|
emr.emr.iType = EMR_SETBKMODE;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = mode;
|
2011-03-10 21:58:47 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? mode : 0;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
COLORREF CDECL EMFDRV_SetBkColor( PHYSDEV dev, COLORREF color )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
EMRSETBKCOLOR emr;
|
2016-06-21 07:52:43 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
if (physDev->restoring) return color; /* don't output records during RestoreDC */
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETBKCOLOR;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.crColor = color;
|
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? color : CLR_INVALID;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
COLORREF CDECL EMFDRV_SetTextColor( PHYSDEV dev, COLORREF color )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
EMRSETTEXTCOLOR emr;
|
2016-06-21 07:52:43 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
if (physDev->restoring) return color; /* don't output records during RestoreDC */
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETTEXTCOLOR;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.crColor = color;
|
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? color : CLR_INVALID;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_SetROP2( PHYSDEV dev, INT rop )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
|
|
|
EMRSETROP2 emr;
|
|
|
|
emr.emr.iType = EMR_SETROP2;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = rop;
|
2011-03-10 21:58:47 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? rop : 0;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_SetPolyFillMode( PHYSDEV dev, INT mode )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
|
|
|
EMRSETPOLYFILLMODE emr;
|
|
|
|
emr.emr.iType = EMR_SETPOLYFILLMODE;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = mode;
|
2011-03-10 21:58:47 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? mode : 0;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_SetStretchBltMode( PHYSDEV dev, INT mode )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
|
|
|
EMRSETSTRETCHBLTMODE emr;
|
|
|
|
emr.emr.iType = EMR_SETSTRETCHBLTMODE;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = mode;
|
2011-03-10 21:58:47 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? mode : 0;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_SetArcDirection(PHYSDEV dev, INT arcDirection)
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
EMRSETARCDIRECTION emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETARCDIRECTION;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iArcDirection = arcDirection;
|
|
|
|
return EMFDRV_WriteRecord(dev, &emr.emr) ? arcDirection : 0;
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
2013-02-14 06:38:31 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pExcludeClipRect );
|
1999-05-02 12:15:16 +02:00
|
|
|
EMREXCLUDECLIPRECT emr;
|
2013-02-14 06:38:31 +01:00
|
|
|
|
1999-05-02 12:15:16 +02:00
|
|
|
emr.emr.iType = EMR_EXCLUDECLIPRECT;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.rclClip.left = left;
|
|
|
|
emr.rclClip.top = top;
|
|
|
|
emr.rclClip.right = right;
|
|
|
|
emr.rclClip.bottom = bottom;
|
2013-02-15 06:06:33 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return ERROR;
|
|
|
|
return next->funcs->pExcludeClipRect( next, left, top, right, bottom );
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom)
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
2013-02-14 06:38:06 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pIntersectClipRect );
|
1999-05-02 12:15:16 +02:00
|
|
|
EMRINTERSECTCLIPRECT emr;
|
2013-02-14 06:38:06 +01:00
|
|
|
|
1999-05-02 12:15:16 +02:00
|
|
|
emr.emr.iType = EMR_INTERSECTCLIPRECT;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.rclClip.left = left;
|
|
|
|
emr.rclClip.top = top;
|
|
|
|
emr.rclClip.right = right;
|
|
|
|
emr.rclClip.bottom = bottom;
|
2013-02-15 06:06:33 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return ERROR;
|
|
|
|
return next->funcs->pIntersectClipRect( next, left, top, right, bottom );
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
2013-02-14 06:37:38 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pOffsetClipRgn );
|
1999-05-02 12:15:16 +02:00
|
|
|
EMROFFSETCLIPRGN emr;
|
2013-02-14 06:37:38 +01:00
|
|
|
|
1999-05-02 12:15:16 +02:00
|
|
|
emr.emr.iType = EMR_OFFSETCLIPRGN;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.ptlOffset.x = x;
|
|
|
|
emr.ptlOffset.y = y;
|
2013-02-15 06:06:33 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return ERROR;
|
|
|
|
return next->funcs->pOffsetClipRgn( next, x, y );
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
|
2002-05-09 06:03:46 +02:00
|
|
|
{
|
2013-02-13 09:47:13 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pExtSelectClipRgn );
|
2002-05-09 06:03:46 +02:00
|
|
|
EMREXTSELECTCLIPRGN *emr;
|
|
|
|
DWORD size, rgnsize;
|
|
|
|
BOOL ret;
|
|
|
|
|
2002-05-29 00:47:49 +02:00
|
|
|
if (!hrgn)
|
|
|
|
{
|
|
|
|
if (mode != RGN_COPY) return ERROR;
|
|
|
|
rgnsize = 0;
|
|
|
|
}
|
2021-07-07 15:02:59 +02:00
|
|
|
else rgnsize = NtGdiGetRegionData( hrgn, 0, NULL );
|
2002-05-29 00:47:49 +02:00
|
|
|
|
|
|
|
size = rgnsize + offsetof(EMREXTSELECTCLIPRGN,RgnData);
|
2002-05-09 06:03:46 +02:00
|
|
|
emr = HeapAlloc( GetProcessHeap(), 0, size );
|
2021-07-07 15:02:59 +02:00
|
|
|
if (rgnsize) NtGdiGetRegionData( hrgn, rgnsize, (RGNDATA *)&emr->RgnData );
|
2002-05-09 06:03:46 +02:00
|
|
|
|
|
|
|
emr->emr.iType = EMR_EXTSELECTCLIPRGN;
|
|
|
|
emr->emr.nSize = size;
|
|
|
|
emr->cbRgnData = rgnsize;
|
|
|
|
emr->iMode = mode;
|
|
|
|
|
|
|
|
ret = EMFDRV_WriteRecord( dev, &emr->emr );
|
|
|
|
HeapFree( GetProcessHeap(), 0, emr );
|
2013-02-13 09:47:13 +01:00
|
|
|
return ret ? next->funcs->pExtSelectClipRgn( next, hrgn, mode ) : ERROR;
|
2002-05-09 06:03:46 +02:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_SetMapMode( PHYSDEV dev, INT mode )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetMapMode );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETMAPMODE emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
INT ret;
|
|
|
|
|
2011-03-11 12:03:41 +01:00
|
|
|
emr.emr.iType = EMR_SETMAPMODE;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = mode;
|
|
|
|
|
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pSetMapMode( next, mode );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_SetViewportExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetViewportExtEx );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETVIEWPORTEXTEX emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETVIEWPORTEXTEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.szlExtent.cx = cx;
|
|
|
|
emr.szlExtent.cy = cy;
|
|
|
|
|
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pSetViewportExtEx( next, cx, cy, size );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_SetWindowExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetWindowExtEx );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETWINDOWEXTEX emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETWINDOWEXTEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.szlExtent.cx = cx;
|
|
|
|
emr.szlExtent.cy = cy;
|
|
|
|
|
2014-01-28 00:04:18 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pSetWindowExtEx( next, cx, cy, size );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetViewportOrgEx );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETVIEWPORTORGEX emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETVIEWPORTORGEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.ptlOrigin.x = x;
|
|
|
|
emr.ptlOrigin.y = y;
|
|
|
|
|
2014-01-28 00:04:18 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pSetViewportOrgEx( next, x, y, pt );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetWindowOrgEx );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETWINDOWORGEX emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETWINDOWORGEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.ptlOrigin.x = x;
|
|
|
|
emr.ptlOrigin.y = y;
|
|
|
|
|
2014-01-28 00:04:18 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pSetWindowOrgEx( next, x, y, pt );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pScaleViewportExtEx );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSCALEVIEWPORTEXTEX emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SCALEVIEWPORTEXTEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.xNum = xNum;
|
|
|
|
emr.xDenom = xDenom;
|
|
|
|
emr.yNum = yNum;
|
|
|
|
emr.yDenom = yDenom;
|
|
|
|
|
2014-01-28 00:04:18 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pScaleViewportExtEx( next, xNum, xDenom, yNum, yDenom, size );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pScaleWindowExtEx );
|
|
|
|
EMRSCALEWINDOWEXTEX emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_SCALEWINDOWEXTEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.xNum = xNum;
|
|
|
|
emr.xDenom = xDenom;
|
|
|
|
emr.yNum = yNum;
|
|
|
|
emr.yDenom = yDenom;
|
|
|
|
|
2014-01-28 00:04:18 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2011-03-11 12:03:41 +01:00
|
|
|
return next->funcs->pScaleWindowExtEx( next, xNum, xDenom, yNum, yDenom, size );
|
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
DWORD CDECL EMFDRV_SetLayout( PHYSDEV dev, DWORD layout )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
2021-04-29 04:53:24 +02:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetLayout );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETLAYOUT emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
DWORD ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETLAYOUT;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = layout;
|
2021-04-20 10:09:21 +02:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return GDI_ERROR;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pSetLayout( next, layout );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform)
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
2011-03-15 14:03:02 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetWorldTransform );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETWORLDTRANSFORM emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETWORLDTRANSFORM;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.xform = *xform;
|
|
|
|
|
2011-03-15 14:03:02 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pSetWorldTransform( next, xform );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, DWORD mode)
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
2011-03-15 14:03:02 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pModifyWorldTransform );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRMODIFYWORLDTRANSFORM emr;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_MODIFYWORLDTRANSFORM;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
2021-03-31 09:55:13 +02:00
|
|
|
if (mode == MWT_IDENTITY)
|
|
|
|
{
|
|
|
|
emr.xform.eM11 = 1.0f;
|
|
|
|
emr.xform.eM12 = 0.0f;
|
|
|
|
emr.xform.eM21 = 0.0f;
|
|
|
|
emr.xform.eM22 = 1.0f;
|
|
|
|
emr.xform.eDx = 0.0f;
|
|
|
|
emr.xform.eDy = 0.0f;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
emr.xform = *xform;
|
|
|
|
}
|
2011-03-11 12:03:41 +01:00
|
|
|
emr.iMode = mode;
|
|
|
|
|
2011-03-15 14:03:02 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pModifyWorldTransform( next, xform, mode );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pOffsetViewportOrgEx );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETVIEWPORTORGEX emr;
|
2011-03-28 17:00:47 +02:00
|
|
|
POINT prev;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
2011-04-04 12:27:09 +02:00
|
|
|
GetViewportOrgEx( dev->hdc, &prev );
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETVIEWPORTORGEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
2011-03-28 17:00:47 +02:00
|
|
|
emr.ptlOrigin.x = prev.x + x;
|
|
|
|
emr.ptlOrigin.y = prev.y + y;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
2014-01-28 00:04:18 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pOffsetViewportOrgEx( next, x, y, pt );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
2011-03-11 12:03:41 +01:00
|
|
|
{
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pOffsetWindowOrgEx );
|
2021-04-20 10:09:22 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2011-03-11 12:03:41 +01:00
|
|
|
EMRSETWINDOWORGEX emr;
|
2011-03-28 17:00:47 +02:00
|
|
|
POINT prev;
|
2021-04-20 10:09:22 +02:00
|
|
|
BOOL ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
2011-04-04 12:27:09 +02:00
|
|
|
GetWindowOrgEx( dev->hdc, &prev );
|
2011-03-11 12:03:41 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETWINDOWORGEX;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
2011-03-28 17:00:47 +02:00
|
|
|
emr.ptlOrigin.x = prev.x + x;
|
|
|
|
emr.ptlOrigin.y = prev.y + y;
|
2011-03-11 12:03:41 +01:00
|
|
|
|
2014-01-28 00:04:18 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2021-04-20 10:09:22 +02:00
|
|
|
physDev->modifying_transform++;
|
|
|
|
ret = next->funcs->pOffsetWindowOrgEx( next, x, y, pt );
|
|
|
|
physDev->modifying_transform--;
|
|
|
|
return ret;
|
2011-03-11 12:03:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
DWORD CDECL EMFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags )
|
1999-05-02 12:15:16 +02:00
|
|
|
{
|
|
|
|
EMRSETMAPPERFLAGS emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_SETMAPPERFLAGS;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.dwFlags = flags;
|
|
|
|
|
2011-03-10 21:58:47 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr ) ? flags : GDI_ERROR;
|
1999-05-02 12:15:16 +02:00
|
|
|
}
|
1999-12-06 00:54:02 +01:00
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_AbortPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
EMRABORTPATH emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_ABORTPATH;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
|
2002-03-28 23:22:05 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr );
|
1999-12-06 00:54:02 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_BeginPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
2016-06-21 07:52:43 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2016-06-21 07:38:19 +02:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pBeginPath );
|
1999-12-06 00:54:02 +01:00
|
|
|
EMRBEGINPATH emr;
|
2016-07-29 16:09:36 +02:00
|
|
|
DC *dc = get_physdev_dc( dev );
|
2016-04-28 18:47:14 +02:00
|
|
|
|
1999-12-06 00:54:02 +01:00
|
|
|
emr.emr.iType = EMR_BEGINPATH;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
|
2016-06-21 07:38:19 +02:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
|
|
|
if (physDev->path) return TRUE; /* already open */
|
|
|
|
|
|
|
|
if (!next->funcs->pBeginPath( next )) return FALSE;
|
|
|
|
push_dc_driver( &dc->physDev, &physDev->pathdev, &emfpath_driver );
|
|
|
|
physDev->path = TRUE;
|
|
|
|
return TRUE;
|
1999-12-06 00:54:02 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_CloseFigure( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
EMRCLOSEFIGURE emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_CLOSEFIGURE;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
|
2016-06-21 07:38:19 +02:00
|
|
|
EMFDRV_WriteRecord( dev, &emr.emr );
|
|
|
|
return FALSE; /* always fails without a path */
|
1999-12-06 00:54:02 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_EndPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
EMRENDPATH emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_ENDPATH;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
|
2016-06-21 07:38:19 +02:00
|
|
|
EMFDRV_WriteRecord( dev, &emr.emr );
|
|
|
|
return FALSE; /* always fails without a path */
|
1999-12-06 00:54:02 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_FlattenPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
EMRFLATTENPATH emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_FLATTENPATH;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
|
2002-03-28 23:22:05 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr );
|
1999-12-06 00:54:02 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_SelectClipPath( PHYSDEV dev, INT iMode )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
2013-02-15 06:06:33 +01:00
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSelectClipPath );
|
1999-12-06 00:54:02 +01:00
|
|
|
EMRSELECTCLIPPATH emr;
|
2017-06-21 10:34:17 +02:00
|
|
|
BOOL ret = FALSE;
|
|
|
|
HRGN hrgn;
|
1999-12-06 00:54:02 +01:00
|
|
|
|
|
|
|
emr.emr.iType = EMR_SELECTCLIPPATH;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
emr.iMode = iMode;
|
|
|
|
|
2013-02-15 06:06:33 +01:00
|
|
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
2017-06-21 10:34:17 +02:00
|
|
|
hrgn = PathToRegion( dev->hdc );
|
|
|
|
if (hrgn)
|
|
|
|
{
|
|
|
|
ret = next->funcs->pExtSelectClipRgn( next, hrgn, iMode );
|
|
|
|
DeleteObject( hrgn );
|
|
|
|
}
|
|
|
|
return ret;
|
1999-12-06 00:54:02 +01:00
|
|
|
}
|
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
BOOL CDECL EMFDRV_WidenPath( PHYSDEV dev )
|
1999-12-06 00:54:02 +01:00
|
|
|
{
|
|
|
|
EMRWIDENPATH emr;
|
|
|
|
|
|
|
|
emr.emr.iType = EMR_WIDENPATH;
|
|
|
|
emr.emr.nSize = sizeof(emr);
|
|
|
|
|
2002-03-28 23:22:05 +01:00
|
|
|
return EMFDRV_WriteRecord( dev, &emr.emr );
|
1999-12-06 00:54:02 +01:00
|
|
|
}
|
2002-08-17 02:25:05 +02:00
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
INT CDECL EMFDRV_GetDeviceCaps(PHYSDEV dev, INT cap)
|
2002-08-17 02:25:05 +02:00
|
|
|
{
|
2016-06-21 07:52:43 +02:00
|
|
|
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
2002-08-17 02:25:05 +02:00
|
|
|
|
2018-10-05 21:35:35 +02:00
|
|
|
if (cap >= 0 && cap < ARRAY_SIZE( physDev->dev_caps ))
|
2017-08-22 13:42:34 +02:00
|
|
|
return physDev->dev_caps[cap];
|
|
|
|
return 0;
|
2002-08-17 02:25:05 +02:00
|
|
|
}
|
2016-06-21 07:38:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* emfpathdrv_AbortPath
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL emfpathdrv_AbortPath( PHYSDEV dev )
|
2016-06-21 07:38:19 +02:00
|
|
|
{
|
|
|
|
PHYSDEV emfdev = get_emfdev( dev );
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pAbortPath );
|
2016-07-29 16:09:36 +02:00
|
|
|
DC *dc = get_physdev_dc( dev );
|
2016-06-21 07:38:19 +02:00
|
|
|
|
|
|
|
emfpath_driver.pDeleteDC( pop_dc_driver( dc, &emfpath_driver ));
|
|
|
|
emfdev->funcs->pAbortPath( emfdev );
|
|
|
|
return next->funcs->pAbortPath( next );
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* emfpathdrv_BeginPath
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL emfpathdrv_BeginPath( PHYSDEV dev )
|
2016-06-21 07:38:19 +02:00
|
|
|
{
|
|
|
|
PHYSDEV emfdev = get_emfdev( dev );
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pBeginPath );
|
|
|
|
|
|
|
|
return (emfdev->funcs->pBeginPath( emfdev ) && next->funcs->pBeginPath( next ));
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* emfpathdrv_CloseFigure
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL emfpathdrv_CloseFigure( PHYSDEV dev )
|
2016-06-21 07:38:19 +02:00
|
|
|
{
|
|
|
|
PHYSDEV emfdev = get_emfdev( dev );
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pCloseFigure );
|
|
|
|
|
|
|
|
emfdev->funcs->pCloseFigure( emfdev );
|
|
|
|
return next->funcs->pCloseFigure( next );
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* emfpathdrv_CreateDC
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL emfpathdrv_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
|
|
|
|
LPCWSTR output, const DEVMODEW *devmode )
|
2016-06-21 07:38:19 +02:00
|
|
|
{
|
|
|
|
assert( 0 ); /* should never be called */
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************
|
|
|
|
* emfpathdrv_DeleteDC
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL emfpathdrv_DeleteDC( PHYSDEV dev )
|
2016-06-21 07:38:19 +02:00
|
|
|
{
|
|
|
|
EMFDRV_PDEVICE *physdev = (EMFDRV_PDEVICE *)get_emfdev( dev );
|
|
|
|
|
|
|
|
physdev->path = FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* emfpathdrv_EndPath
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL emfpathdrv_EndPath( PHYSDEV dev )
|
2016-06-21 07:38:19 +02:00
|
|
|
{
|
|
|
|
PHYSDEV emfdev = get_emfdev( dev );
|
|
|
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pEndPath );
|
2016-07-29 16:09:36 +02:00
|
|
|
DC *dc = get_physdev_dc( dev );
|
2016-06-21 07:38:19 +02:00
|
|
|
|
|
|
|
emfpath_driver.pDeleteDC( pop_dc_driver( dc, &emfpath_driver ));
|
|
|
|
emfdev->funcs->pEndPath( emfdev );
|
|
|
|
return next->funcs->pEndPath( next );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static const struct gdi_dc_funcs emfpath_driver =
|
|
|
|
{
|
|
|
|
NULL, /* pAbortDoc */
|
|
|
|
emfpathdrv_AbortPath, /* pAbortPath */
|
|
|
|
NULL, /* pAlphaBlend */
|
2021-07-20 09:20:02 +02:00
|
|
|
NULL, /* pAngleArc */
|
2021-07-20 09:19:24 +02:00
|
|
|
NULL, /* pArc */
|
|
|
|
NULL, /* pArcTo */
|
2016-06-21 07:38:19 +02:00
|
|
|
emfpathdrv_BeginPath, /* pBeginPath */
|
|
|
|
NULL, /* pBlendImage */
|
2021-07-20 09:19:24 +02:00
|
|
|
NULL, /* pChord */
|
2016-06-21 07:38:19 +02:00
|
|
|
emfpathdrv_CloseFigure, /* pCloseFigure */
|
|
|
|
NULL, /* pCreateCompatibleDC */
|
|
|
|
emfpathdrv_CreateDC, /* pCreateDC */
|
|
|
|
emfpathdrv_DeleteDC, /* pDeleteDC */
|
|
|
|
NULL, /* pDeleteObject */
|
|
|
|
NULL, /* pDeviceCapabilities */
|
2021-07-20 09:19:33 +02:00
|
|
|
NULL, /* pEllipse */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pEndDoc */
|
|
|
|
NULL, /* pEndPage */
|
|
|
|
emfpathdrv_EndPath, /* pEndPath */
|
|
|
|
NULL, /* pEnumFonts */
|
|
|
|
NULL, /* pEnumICMProfiles */
|
|
|
|
NULL, /* pExcludeClipRect */
|
|
|
|
NULL, /* pExtDeviceMode */
|
|
|
|
NULL, /* pExtEscape */
|
|
|
|
NULL, /* pExtFloodFill */
|
|
|
|
NULL, /* pExtSelectClipRgn */
|
2021-07-23 10:49:42 +02:00
|
|
|
NULL, /* pExtTextOut */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pFillPath */
|
|
|
|
NULL, /* pFillRgn */
|
|
|
|
NULL, /* pFlattenPath */
|
|
|
|
NULL, /* pFontIsLinked */
|
|
|
|
NULL, /* pFrameRgn */
|
|
|
|
NULL, /* pGdiComment */
|
|
|
|
NULL, /* pGetBoundsRect */
|
|
|
|
NULL, /* pGetCharABCWidths */
|
|
|
|
NULL, /* pGetCharABCWidthsI */
|
|
|
|
NULL, /* pGetCharWidth */
|
2019-04-09 11:32:59 +02:00
|
|
|
NULL, /* pGetCharWidthInfo */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pGetDeviceCaps */
|
|
|
|
NULL, /* pGetDeviceGammaRamp */
|
|
|
|
NULL, /* pGetFontData */
|
|
|
|
NULL, /* pGetFontRealizationInfo */
|
|
|
|
NULL, /* pGetFontUnicodeRanges */
|
|
|
|
NULL, /* pGetGlyphIndices */
|
|
|
|
NULL, /* pGetGlyphOutline */
|
|
|
|
NULL, /* pGetICMProfile */
|
|
|
|
NULL, /* pGetImage */
|
|
|
|
NULL, /* pGetKerningPairs */
|
|
|
|
NULL, /* pGetNearestColor */
|
|
|
|
NULL, /* pGetOutlineTextMetrics */
|
|
|
|
NULL, /* pGetPixel */
|
|
|
|
NULL, /* pGetSystemPaletteEntries */
|
|
|
|
NULL, /* pGetTextCharsetInfo */
|
|
|
|
NULL, /* pGetTextExtentExPoint */
|
|
|
|
NULL, /* pGetTextExtentExPointI */
|
|
|
|
NULL, /* pGetTextFace */
|
|
|
|
NULL, /* pGetTextMetrics */
|
|
|
|
NULL, /* pGradientFill */
|
|
|
|
NULL, /* pIntersectClipRect */
|
|
|
|
NULL, /* pInvertRgn */
|
2021-07-20 09:18:50 +02:00
|
|
|
NULL, /* pLineTo */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pModifyWorldTransform */
|
2021-07-20 09:19:05 +02:00
|
|
|
NULL, /* pMoveTo */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pOffsetClipRgn */
|
|
|
|
NULL, /* pOffsetViewportOrg */
|
|
|
|
NULL, /* pOffsetWindowOrg */
|
|
|
|
NULL, /* pPaintRgn */
|
|
|
|
NULL, /* pPatBlt */
|
2021-07-20 09:19:24 +02:00
|
|
|
NULL, /* pPie */
|
2021-07-22 11:27:07 +02:00
|
|
|
NULL, /* pPolyBezier */
|
2021-07-22 11:27:36 +02:00
|
|
|
NULL, /* pPolyBezierTo */
|
2021-07-23 10:48:48 +02:00
|
|
|
NULL, /* pPolyDraw */
|
2021-07-22 11:25:17 +02:00
|
|
|
NULL, /* pPolyPolygon */
|
2021-07-22 11:26:15 +02:00
|
|
|
NULL, /* pPolyPolyline */
|
2021-07-22 11:27:20 +02:00
|
|
|
NULL, /* pPolylineTo */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pPutImage */
|
|
|
|
NULL, /* pRealizeDefaultPalette */
|
|
|
|
NULL, /* pRealizePalette */
|
2021-07-20 09:19:51 +02:00
|
|
|
NULL, /* pRectangle */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pResetDC */
|
|
|
|
NULL, /* pRestoreDC */
|
2021-07-20 09:19:41 +02:00
|
|
|
NULL, /* pRoundRect */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pSaveDC */
|
|
|
|
NULL, /* pScaleViewportExt */
|
|
|
|
NULL, /* pScaleWindowExt */
|
|
|
|
NULL, /* pSelectBitmap */
|
|
|
|
NULL, /* pSelectBrush */
|
|
|
|
NULL, /* pSelectClipPath */
|
|
|
|
NULL, /* pSelectFont */
|
|
|
|
NULL, /* pSelectPalette */
|
|
|
|
NULL, /* pSelectPen */
|
|
|
|
NULL, /* pSetArcDirection */
|
|
|
|
NULL, /* pSetBkColor */
|
|
|
|
NULL, /* pSetBkMode */
|
2020-02-11 11:57:56 +01:00
|
|
|
NULL, /* pSetBoundsRect */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* pSetDCBrushColor */
|
|
|
|
NULL, /* pSetDCPenColor */
|
|
|
|
NULL, /* pSetDIBitsToDevice */
|
|
|
|
NULL, /* pSetDeviceClipping */
|
|
|
|
NULL, /* pSetDeviceGammaRamp */
|
|
|
|
NULL, /* pSetLayout */
|
|
|
|
NULL, /* pSetMapMode */
|
|
|
|
NULL, /* pSetMapperFlags */
|
|
|
|
NULL, /* pSetPixel */
|
|
|
|
NULL, /* pSetPolyFillMode */
|
|
|
|
NULL, /* pSetROP2 */
|
|
|
|
NULL, /* pSetRelAbs */
|
|
|
|
NULL, /* pSetStretchBltMode */
|
|
|
|
NULL, /* pSetTextAlign */
|
|
|
|
NULL, /* pSetTextCharacterExtra */
|
|
|
|
NULL, /* pSetTextColor */
|
|
|
|
NULL, /* pSetTextJustification */
|
|
|
|
NULL, /* pSetViewportExt */
|
|
|
|
NULL, /* pSetViewportOrg */
|
|
|
|
NULL, /* pSetWindowExt */
|
|
|
|
NULL, /* pSetWindowOrg */
|
|
|
|
NULL, /* pSetWorldTransform */
|
|
|
|
NULL, /* pStartDoc */
|
|
|
|
NULL, /* pStartPage */
|
|
|
|
NULL, /* pStretchBlt */
|
|
|
|
NULL, /* pStretchDIBits */
|
|
|
|
NULL, /* pStrokeAndFillPath */
|
|
|
|
NULL, /* pStrokePath */
|
|
|
|
NULL, /* pUnrealizePalette */
|
|
|
|
NULL, /* pWidenPath */
|
2019-10-22 10:38:56 +02:00
|
|
|
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
|
|
|
|
NULL, /* pD3DKMTSetVidPnSourceOwner */
|
2016-06-21 07:38:19 +02:00
|
|
|
NULL, /* wine_get_wgl_driver */
|
2018-02-26 19:42:15 +01:00
|
|
|
NULL, /* wine_get_vulkan_driver */
|
2016-06-21 07:38:19 +02:00
|
|
|
GDI_PRIORITY_PATH_DRV + 1 /* priority */
|
|
|
|
};
|