gdi32: Add a SetLayout driver entry point and implement it for enhanced metafiles.
This commit is contained in:
parent
965d41717b
commit
30997b5634
|
@ -2014,6 +2014,10 @@ DWORD WINAPI SetLayout(HDC hdc, DWORD layout)
|
|||
|
||||
DC * dc = get_dc_ptr( hdc );
|
||||
if (dc)
|
||||
{
|
||||
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetLayout );
|
||||
layout = physdev->funcs->pSetLayout( physdev, layout );
|
||||
if (layout != GDI_ERROR)
|
||||
{
|
||||
oldlayout = dc->layout;
|
||||
dc->layout = layout;
|
||||
|
@ -2022,6 +2026,7 @@ DWORD WINAPI SetLayout(HDC hdc, DWORD layout)
|
|||
if (layout & LAYOUT_RTL) dc->MapMode = MM_ANISOTROPIC;
|
||||
DC_UpdateXforms( dc );
|
||||
}
|
||||
}
|
||||
release_dc_ptr( dc );
|
||||
}
|
||||
|
||||
|
|
|
@ -467,6 +467,11 @@ static void CDECL nulldrv_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN cli
|
|||
{
|
||||
}
|
||||
|
||||
static DWORD CDECL nulldrv_SetLayout( PHYSDEV dev, DWORD layout )
|
||||
{
|
||||
return layout;
|
||||
}
|
||||
|
||||
static DWORD CDECL nulldrv_SetMapperFlags( PHYSDEV dev, DWORD flags )
|
||||
{
|
||||
return flags;
|
||||
|
@ -683,6 +688,7 @@ const DC_FUNCTIONS null_driver =
|
|||
NULL, /* pSetDIBitsToDevice */
|
||||
nulldrv_SetDeviceClipping, /* pSetDeviceClipping */
|
||||
NULL, /* pSetDeviceGammaRamp */
|
||||
nulldrv_SetLayout, /* pSetLayout */
|
||||
nulldrv_SetMapMode, /* pSetMapMode */
|
||||
nulldrv_SetMapperFlags, /* pSetMapperFlags */
|
||||
nulldrv_SetPixel, /* pSetPixel */
|
||||
|
|
|
@ -137,6 +137,7 @@ extern INT CDECL EMFDRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest, INT yDes
|
|||
INT ySrc, UINT startscan, UINT lines,
|
||||
LPCVOID bits, const BITMAPINFO *info,
|
||||
UINT coloruse ) DECLSPEC_HIDDEN;
|
||||
extern DWORD CDECL EMFDRV_SetLayout( PHYSDEV dev, DWORD layout ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL EMFDRV_SetMapMode( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
|
||||
extern DWORD CDECL EMFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL EMFDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -127,6 +127,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
|
|||
EMFDRV_SetDIBitsToDevice, /* pSetDIBitsToDevice */
|
||||
NULL, /* pSetDeviceClipping */
|
||||
NULL, /* pSetDeviceGammaRamp */
|
||||
EMFDRV_SetLayout, /* pSetLayout */
|
||||
EMFDRV_SetMapMode, /* pSetMapMode */
|
||||
EMFDRV_SetMapperFlags, /* pSetMapperFlags */
|
||||
EMFDRV_SetPixel, /* pSetPixel */
|
||||
|
|
|
@ -120,6 +120,16 @@ BOOL CDECL EMFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
|||
return next->funcs->pScaleWindowExtEx( next, xNum, xDenom, yNum, yDenom, size );
|
||||
}
|
||||
|
||||
DWORD CDECL EMFDRV_SetLayout( PHYSDEV dev, DWORD layout )
|
||||
{
|
||||
EMRSETLAYOUT emr;
|
||||
|
||||
emr.emr.iType = EMR_SETLAYOUT;
|
||||
emr.emr.nSize = sizeof(emr);
|
||||
emr.iMode = layout;
|
||||
return EMFDRV_WriteRecord( dev, &emr.emr ) ? layout : GDI_ERROR;
|
||||
}
|
||||
|
||||
BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform)
|
||||
{
|
||||
EMRSETWORLDTRANSFORM emr;
|
||||
|
|
|
@ -175,6 +175,7 @@ typedef struct tagDC_FUNCS
|
|||
const BITMAPINFO*,UINT);
|
||||
VOID (CDECL *pSetDeviceClipping)(PHYSDEV,HRGN,HRGN);
|
||||
BOOL (CDECL *pSetDeviceGammaRamp)(PHYSDEV,LPVOID);
|
||||
DWORD (CDECL *pSetLayout)(PHYSDEV,DWORD);
|
||||
INT (CDECL *pSetMapMode)(PHYSDEV,INT);
|
||||
DWORD (CDECL *pSetMapperFlags)(PHYSDEV,DWORD);
|
||||
COLORREF (CDECL *pSetPixel)(PHYSDEV,INT,INT,COLORREF);
|
||||
|
|
|
@ -125,6 +125,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
|
|||
MFDRV_SetDIBitsToDevice, /* pSetDIBitsToDevice */
|
||||
NULL, /* pSetDeviceClipping */
|
||||
NULL, /* pSetDeviceGammaRamp */
|
||||
NULL, /* pSetLayout */
|
||||
MFDRV_SetMapMode, /* pSetMapMode */
|
||||
MFDRV_SetMapperFlags, /* pSetMapperFlags */
|
||||
MFDRV_SetPixel, /* pSetPixel */
|
||||
|
|
Loading…
Reference in New Issue