mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-31 14:43:38 +00:00
Mapping mode functions should change dc settings when dc is an enhmf.
This commit is contained in:
parent
d788939d8f
commit
3d10c1fc6e
|
@ -85,15 +85,6 @@ INT EMFDRV_SetStretchBltMode( PHYSDEV dev, INT mode )
|
|||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
INT EMFDRV_SetMapMode( PHYSDEV dev, INT mode )
|
||||
{
|
||||
EMRSETMAPMODE emr;
|
||||
emr.emr.iType = EMR_SETMAPMODE;
|
||||
emr.emr.nSize = sizeof(emr);
|
||||
emr.iMode = mode;
|
||||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
INT EMFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
|
||||
{
|
||||
EMREXCLUDECLIPRECT emr;
|
||||
|
|
|
@ -80,8 +80,8 @@ extern BOOL EMFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn );
|
|||
extern BOOL EMFDRV_LineTo( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_MoveTo( PHYSDEV dev, INT x, INT y );
|
||||
extern INT EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT EMFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT EMFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_PaintRgn( PHYSDEV dev, HRGN hrgn );
|
||||
extern BOOL EMFDRV_PatBlt( PHYSDEV dev, INT left, INT top,
|
||||
INT width, INT height, DWORD rop );
|
||||
|
@ -101,9 +101,9 @@ extern BOOL EMFDRV_RoundRect( PHYSDEV dev, INT left, INT top,
|
|||
INT right, INT bottom, INT ell_width,
|
||||
INT ell_height );
|
||||
extern INT EMFDRV_SaveDC( PHYSDEV dev );
|
||||
extern BOOL EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum,
|
||||
extern INT EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum,
|
||||
INT xDenom, INT yNum, INT yDenom );
|
||||
extern BOOL EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom,
|
||||
extern INT EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom,
|
||||
INT yNum, INT yDenom );
|
||||
extern HBITMAP EMFDRV_SelectBitmap( PHYSDEV dev, HBITMAP handle );
|
||||
extern HBRUSH EMFDRV_SelectBrush( PHYSDEV dev, HBRUSH handle );
|
||||
|
@ -125,10 +125,10 @@ extern INT EMFDRV_SetROP2( PHYSDEV dev, INT rop );
|
|||
extern INT EMFDRV_SetStretchBltMode( PHYSDEV dev, INT mode );
|
||||
extern UINT EMFDRV_SetTextAlign( PHYSDEV dev, UINT align );
|
||||
extern COLORREF EMFDRV_SetTextColor( PHYSDEV dev, COLORREF color );
|
||||
extern BOOL EMFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT EMFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y );
|
||||
extern INT EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT EMFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y );
|
||||
extern INT EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL EMFDRV_StretchBlt( PHYSDEV devDst, INT xDst, INT yDst,
|
||||
INT widthDst, INT heightDst,
|
||||
PHYSDEV devSrc, INT xSrc, INT ySrc,
|
||||
|
|
|
@ -20,7 +20,17 @@
|
|||
|
||||
#include "enhmfdrv/enhmetafiledrv.h"
|
||||
|
||||
BOOL EMFDRV_SetViewportExt( PHYSDEV dev, INT cx, INT cy )
|
||||
INT EMFDRV_SetMapMode( PHYSDEV dev, INT mode )
|
||||
{
|
||||
EMRSETMAPMODE emr;
|
||||
emr.emr.iType = EMR_SETMAPMODE;
|
||||
emr.emr.nSize = sizeof(emr);
|
||||
emr.iMode = mode;
|
||||
|
||||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
INT EMFDRV_SetViewportExt( PHYSDEV dev, INT cx, INT cy )
|
||||
{
|
||||
EMRSETVIEWPORTEXTEX emr;
|
||||
|
||||
|
@ -32,7 +42,7 @@ BOOL EMFDRV_SetViewportExt( PHYSDEV dev, INT cx, INT cy )
|
|||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
BOOL EMFDRV_SetWindowExt( PHYSDEV dev, INT cx, INT cy )
|
||||
INT EMFDRV_SetWindowExt( PHYSDEV dev, INT cx, INT cy )
|
||||
{
|
||||
EMRSETWINDOWEXTEX emr;
|
||||
|
||||
|
@ -44,7 +54,7 @@ BOOL EMFDRV_SetWindowExt( PHYSDEV dev, INT cx, INT cy )
|
|||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
BOOL EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
|
||||
INT EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
EMRSETVIEWPORTORGEX emr;
|
||||
|
||||
|
@ -56,7 +66,7 @@ BOOL EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
|
|||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
BOOL EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
|
||||
INT EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
EMRSETWINDOWORGEX emr;
|
||||
|
||||
|
@ -68,8 +78,8 @@ BOOL EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
|
|||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
BOOL EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom )
|
||||
INT EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom )
|
||||
{
|
||||
EMRSCALEVIEWPORTEXTEX emr;
|
||||
|
||||
|
@ -83,8 +93,8 @@ BOOL EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
|||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
BOOL EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom )
|
||||
INT EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom )
|
||||
{
|
||||
EMRSCALEWINDOWEXTEX emr;
|
||||
|
||||
|
@ -97,5 +107,3 @@ BOOL EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
|||
|
||||
return EMFDRV_WriteRecord( dev, &emr.emr );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,89 +27,95 @@
|
|||
*/
|
||||
INT MFDRV_SetMapMode( PHYSDEV dev, INT mode )
|
||||
{
|
||||
METAFILEDRV_PDEVICE *physDev = (METAFILEDRV_PDEVICE *)dev;
|
||||
INT prevMode = GetMapMode( physDev->hdc );
|
||||
MFDRV_MetaParam1( dev, META_SETMAPMODE, mode );
|
||||
return prevMode;
|
||||
if(!MFDRV_MetaParam1( dev, META_SETMAPMODE, mode ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_SetViewportExt
|
||||
*/
|
||||
BOOL MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y )
|
||||
INT MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_SetViewportOrg
|
||||
*/
|
||||
BOOL MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
|
||||
INT MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_SetWindowExt
|
||||
*/
|
||||
BOOL MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y )
|
||||
INT MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_SetWindowOrg
|
||||
*/
|
||||
BOOL MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
|
||||
INT MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_OffsetViewportOrg
|
||||
*/
|
||||
BOOL MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y )
|
||||
INT MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_OffsetWindowOrg
|
||||
*/
|
||||
BOOL MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y )
|
||||
INT MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_ScaleViewportExt
|
||||
*/
|
||||
BOOL MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
|
||||
INT MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
|
||||
{
|
||||
MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MFDRV_ScaleWindowExt
|
||||
*/
|
||||
BOOL MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
|
||||
INT MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
|
||||
{
|
||||
MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom );
|
||||
return TRUE;
|
||||
if(!MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom ))
|
||||
return FALSE;
|
||||
return GDI_NO_MORE_WORK;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,9 +86,9 @@ extern INT MFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, I
|
|||
extern BOOL MFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn );
|
||||
extern BOOL MFDRV_LineTo( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_MoveTo( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_PaintRgn( PHYSDEV dev, HRGN hrgn );
|
||||
extern BOOL MFDRV_PatBlt( PHYSDEV dev, INT left, INT top, INT width, INT height,
|
||||
DWORD rop );
|
||||
|
@ -108,10 +108,10 @@ extern BOOL MFDRV_RoundRect( PHYSDEV dev, INT left, INT top,
|
|||
INT right, INT bottom, INT ell_width,
|
||||
INT ell_height );
|
||||
extern INT MFDRV_SaveDC( PHYSDEV dev );
|
||||
extern BOOL MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom );
|
||||
extern BOOL MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom );
|
||||
extern INT MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom );
|
||||
extern INT MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||
INT yDenom );
|
||||
extern HBITMAP MFDRV_SelectBitmap( PHYSDEV dev, HBITMAP handle );
|
||||
extern HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH handle );
|
||||
extern BOOL MFDRV_SelectClipPath( PHYSDEV dev, INT iMode );
|
||||
|
@ -130,10 +130,10 @@ extern UINT MFDRV_SetTextAlign( PHYSDEV dev, UINT align );
|
|||
extern INT MFDRV_SetTextCharacterExtra( PHYSDEV dev, INT extra );
|
||||
extern COLORREF MFDRV_SetTextColor( PHYSDEV dev, COLORREF color );
|
||||
extern INT MFDRV_SetTextJustification( PHYSDEV dev, INT extra, INT breaks );
|
||||
extern BOOL MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y );
|
||||
extern INT MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y );
|
||||
extern BOOL MFDRV_StretchBlt( PHYSDEV devDst, INT xDst, INT yDst, INT widthDst,
|
||||
INT heightDst, PHYSDEV devSrc, INT xSrc, INT ySrc,
|
||||
INT widthSrc, INT heightSrc, DWORD rop );
|
||||
|
|
|
@ -144,20 +144,24 @@ BOOL WINAPI LPtoDP( HDC hdc, LPPOINT points, INT count )
|
|||
*/
|
||||
INT WINAPI SetMapMode( HDC hdc, INT mode )
|
||||
{
|
||||
INT prevMode;
|
||||
INT ret;
|
||||
INT horzSize, vertSize, horzRes, vertRes;
|
||||
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return 0;
|
||||
if (dc->funcs->pSetMapMode)
|
||||
{
|
||||
prevMode = dc->funcs->pSetMapMode( dc->physDev, mode );
|
||||
goto done;
|
||||
if((ret = dc->funcs->pSetMapMode( dc->physDev, mode )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
TRACE("%04x %d\n", hdc, mode );
|
||||
|
||||
prevMode = dc->MapMode;
|
||||
ret = dc->MapMode;
|
||||
horzSize = GetDeviceCaps( hdc, HORZSIZE );
|
||||
vertSize = GetDeviceCaps( hdc, VERTSIZE );
|
||||
horzRes = GetDeviceCaps( hdc, HORZRES );
|
||||
|
@ -210,7 +214,7 @@ INT WINAPI SetMapMode( HDC hdc, INT mode )
|
|||
DC_UpdateXforms( dc );
|
||||
done:
|
||||
GDI_ReleaseObj( hdc );
|
||||
return prevMode;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -219,13 +223,17 @@ INT WINAPI SetMapMode( HDC hdc, INT mode )
|
|||
*/
|
||||
BOOL WINAPI SetViewportExtEx( HDC hdc, INT x, INT y, LPSIZE size )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pSetViewportExt)
|
||||
{
|
||||
ret = dc->funcs->pSetViewportExt( dc->physDev, x, y );
|
||||
goto done;
|
||||
if((ret = dc->funcs->pSetViewportExt( dc->physDev, x, y )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (size)
|
||||
{
|
||||
|
@ -254,22 +262,28 @@ BOOL WINAPI SetViewportExtEx( HDC hdc, INT x, INT y, LPSIZE size )
|
|||
*/
|
||||
BOOL WINAPI SetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pSetViewportOrg)
|
||||
ret = dc->funcs->pSetViewportOrg( dc->physDev, x, y );
|
||||
else
|
||||
{
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->vportOrgX;
|
||||
pt->y = dc->vportOrgY;
|
||||
}
|
||||
dc->vportOrgX = x;
|
||||
dc->vportOrgY = y;
|
||||
DC_UpdateXforms( dc );
|
||||
if((ret = dc->funcs->pSetViewportOrg( dc->physDev, x, y )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->vportOrgX;
|
||||
pt->y = dc->vportOrgY;
|
||||
}
|
||||
dc->vportOrgX = x;
|
||||
dc->vportOrgY = y;
|
||||
DC_UpdateXforms( dc );
|
||||
|
||||
done:
|
||||
GDI_ReleaseObj( hdc );
|
||||
return ret;
|
||||
}
|
||||
|
@ -280,13 +294,17 @@ BOOL WINAPI SetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
|||
*/
|
||||
BOOL WINAPI SetWindowExtEx( HDC hdc, INT x, INT y, LPSIZE size )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pSetWindowExt)
|
||||
{
|
||||
ret = dc->funcs->pSetWindowExt( dc->physDev, x, y );
|
||||
goto done;
|
||||
if((ret = dc->funcs->pSetWindowExt( dc->physDev, x, y )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (size)
|
||||
{
|
||||
|
@ -315,21 +333,27 @@ BOOL WINAPI SetWindowExtEx( HDC hdc, INT x, INT y, LPSIZE size )
|
|||
*/
|
||||
BOOL WINAPI SetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pSetWindowOrg) ret = dc->funcs->pSetWindowOrg( dc->physDev, x, y );
|
||||
else
|
||||
if (dc->funcs->pSetWindowOrg)
|
||||
{
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->wndOrgX;
|
||||
pt->y = dc->wndOrgY;
|
||||
}
|
||||
dc->wndOrgX = x;
|
||||
dc->wndOrgY = y;
|
||||
DC_UpdateXforms( dc );
|
||||
if((ret = dc->funcs->pSetWindowOrg( dc->physDev, x, y )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->wndOrgX;
|
||||
pt->y = dc->wndOrgY;
|
||||
}
|
||||
dc->wndOrgX = x;
|
||||
dc->wndOrgY = y;
|
||||
DC_UpdateXforms( dc );
|
||||
done:
|
||||
GDI_ReleaseObj( hdc );
|
||||
return ret;
|
||||
}
|
||||
|
@ -340,22 +364,27 @@ BOOL WINAPI SetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
|||
*/
|
||||
BOOL WINAPI OffsetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt)
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pOffsetViewportOrg)
|
||||
ret = dc->funcs->pOffsetViewportOrg( dc->physDev, x, y );
|
||||
else
|
||||
{
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->vportOrgX;
|
||||
pt->y = dc->vportOrgY;
|
||||
}
|
||||
dc->vportOrgX += x;
|
||||
dc->vportOrgY += y;
|
||||
DC_UpdateXforms( dc );
|
||||
if((ret = dc->funcs->pOffsetViewportOrg( dc->physDev, x, y )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->vportOrgX;
|
||||
pt->y = dc->vportOrgY;
|
||||
}
|
||||
dc->vportOrgX += x;
|
||||
dc->vportOrgY += y;
|
||||
DC_UpdateXforms( dc );
|
||||
done:
|
||||
GDI_ReleaseObj( hdc );
|
||||
return ret;
|
||||
}
|
||||
|
@ -366,22 +395,27 @@ BOOL WINAPI OffsetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt)
|
|||
*/
|
||||
BOOL WINAPI OffsetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pOffsetWindowOrg)
|
||||
ret = dc->funcs->pOffsetWindowOrg( dc->physDev, x, y );
|
||||
else
|
||||
{
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->wndOrgX;
|
||||
pt->y = dc->wndOrgY;
|
||||
}
|
||||
dc->wndOrgX += x;
|
||||
dc->wndOrgY += y;
|
||||
DC_UpdateXforms( dc );
|
||||
if((ret = dc->funcs->pOffsetWindowOrg( dc->physDev, x, y )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (pt)
|
||||
{
|
||||
pt->x = dc->wndOrgX;
|
||||
pt->y = dc->wndOrgY;
|
||||
}
|
||||
dc->wndOrgX += x;
|
||||
dc->wndOrgY += y;
|
||||
DC_UpdateXforms( dc );
|
||||
done:
|
||||
GDI_ReleaseObj( hdc );
|
||||
return ret;
|
||||
}
|
||||
|
@ -393,13 +427,17 @@ BOOL WINAPI OffsetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
|||
BOOL WINAPI ScaleViewportExtEx( HDC hdc, INT xNum, INT xDenom,
|
||||
INT yNum, INT yDenom, LPSIZE size )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pScaleViewportExt)
|
||||
{
|
||||
ret = dc->funcs->pScaleViewportExt( dc->physDev, xNum, xDenom, yNum, yDenom );
|
||||
goto done;
|
||||
if((ret = dc->funcs->pScaleViewportExt( dc->physDev, xNum, xDenom, yNum, yDenom )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (size)
|
||||
{
|
||||
|
@ -431,13 +469,17 @@ BOOL WINAPI ScaleViewportExtEx( HDC hdc, INT xNum, INT xDenom,
|
|||
BOOL WINAPI ScaleWindowExtEx( HDC hdc, INT xNum, INT xDenom,
|
||||
INT yNum, INT yDenom, LPSIZE size )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
INT ret = TRUE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
if (dc->funcs->pScaleWindowExt)
|
||||
{
|
||||
ret = dc->funcs->pScaleWindowExt( dc->physDev, xNum, xDenom, yNum, yDenom );
|
||||
goto done;
|
||||
if((ret = dc->funcs->pScaleWindowExt( dc->physDev, xNum, xDenom, yNum, yDenom )) != TRUE)
|
||||
{
|
||||
if(ret == GDI_NO_MORE_WORK)
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (size)
|
||||
{
|
||||
|
|
|
@ -199,8 +199,8 @@ typedef struct tagDC_FUNCS
|
|||
BOOL (*pLineTo)(PHYSDEV,INT,INT);
|
||||
BOOL (*pMoveTo)(PHYSDEV,INT,INT);
|
||||
INT (*pOffsetClipRgn)(PHYSDEV,INT,INT);
|
||||
BOOL (*pOffsetViewportOrg)(PHYSDEV,INT,INT);
|
||||
BOOL (*pOffsetWindowOrg)(PHYSDEV,INT,INT);
|
||||
INT (*pOffsetViewportOrg)(PHYSDEV,INT,INT);
|
||||
INT (*pOffsetWindowOrg)(PHYSDEV,INT,INT);
|
||||
BOOL (*pPaintRgn)(PHYSDEV,HRGN);
|
||||
BOOL (*pPatBlt)(PHYSDEV,INT,INT,INT,INT,DWORD);
|
||||
BOOL (*pPie)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT);
|
||||
|
@ -219,8 +219,8 @@ typedef struct tagDC_FUNCS
|
|||
BOOL (*pRestoreDC)(PHYSDEV,INT);
|
||||
BOOL (*pRoundRect)(PHYSDEV,INT,INT,INT,INT,INT,INT);
|
||||
INT (*pSaveDC)(PHYSDEV);
|
||||
BOOL (*pScaleViewportExt)(PHYSDEV,INT,INT,INT,INT);
|
||||
BOOL (*pScaleWindowExt)(PHYSDEV,INT,INT,INT,INT);
|
||||
INT (*pScaleViewportExt)(PHYSDEV,INT,INT,INT,INT);
|
||||
INT (*pScaleWindowExt)(PHYSDEV,INT,INT,INT,INT);
|
||||
HBITMAP (*pSelectBitmap)(PHYSDEV,HBITMAP);
|
||||
HBRUSH (*pSelectBrush)(PHYSDEV,HBRUSH);
|
||||
BOOL (*pSelectClipPath)(PHYSDEV,INT);
|
||||
|
@ -249,10 +249,10 @@ typedef struct tagDC_FUNCS
|
|||
INT (*pSetTextCharacterExtra)(PHYSDEV,INT);
|
||||
DWORD (*pSetTextColor)(PHYSDEV,DWORD);
|
||||
INT (*pSetTextJustification)(PHYSDEV,INT,INT);
|
||||
BOOL (*pSetViewportExt)(PHYSDEV,INT,INT);
|
||||
BOOL (*pSetViewportOrg)(PHYSDEV,INT,INT);
|
||||
BOOL (*pSetWindowExt)(PHYSDEV,INT,INT);
|
||||
BOOL (*pSetWindowOrg)(PHYSDEV,INT,INT);
|
||||
INT (*pSetViewportExt)(PHYSDEV,INT,INT);
|
||||
INT (*pSetViewportOrg)(PHYSDEV,INT,INT);
|
||||
INT (*pSetWindowExt)(PHYSDEV,INT,INT);
|
||||
INT (*pSetWindowOrg)(PHYSDEV,INT,INT);
|
||||
INT (*pStartDoc)(PHYSDEV,const DOCINFOA*);
|
||||
INT (*pStartPage)(PHYSDEV);
|
||||
BOOL (*pStretchBlt)(PHYSDEV,INT,INT,INT,INT,PHYSDEV,INT,INT,INT,INT,DWORD);
|
||||
|
@ -264,6 +264,10 @@ typedef struct tagDC_FUNCS
|
|||
BOOL (*pWidenPath)(PHYSDEV);
|
||||
} DC_FUNCTIONS;
|
||||
|
||||
/* Certain functions will do no further processing if the driver returns this.
|
||||
Used by mfdrv for example. */
|
||||
#define GDI_NO_MORE_WORK 2
|
||||
|
||||
/* DC hook codes */
|
||||
#define DCHC_INVALIDVISRGN 0x0001
|
||||
#define DCHC_DELETEDC 0x0002
|
||||
|
|
Loading…
Reference in a new issue