gdi32: Handle metafiles directly in SetViewportOrgEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
93b57dba6d
commit
16eaffff06
|
@ -250,23 +250,15 @@ BOOL CDECL EMFDRV_SetWindowExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CDECL EMFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
BOOL EMFDC_SetViewportOrgEx( DC_ATTR *dc_attr, INT x, INT y )
|
||||||
{
|
{
|
||||||
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetViewportOrgEx );
|
|
||||||
EMFDRV_PDEVICE *physDev = get_emf_physdev( dev );
|
|
||||||
EMRSETVIEWPORTORGEX emr;
|
EMRSETVIEWPORTORGEX emr;
|
||||||
BOOL ret;
|
|
||||||
|
|
||||||
emr.emr.iType = EMR_SETVIEWPORTORGEX;
|
emr.emr.iType = EMR_SETVIEWPORTORGEX;
|
||||||
emr.emr.nSize = sizeof(emr);
|
emr.emr.nSize = sizeof(emr);
|
||||||
emr.ptlOrigin.x = x;
|
emr.ptlOrigin.x = x;
|
||||||
emr.ptlOrigin.y = y;
|
emr.ptlOrigin.y = y;
|
||||||
|
return EMFDRV_WriteRecord( dc_attr->emf, &emr.emr );
|
||||||
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
|
|
||||||
physDev->modifying_transform++;
|
|
||||||
ret = next->funcs->pSetViewportOrgEx( next, x, y, pt );
|
|
||||||
physDev->modifying_transform--;
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CDECL EMFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
BOOL CDECL EMFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
||||||
|
|
|
@ -110,7 +110,6 @@ extern INT CDECL EMFDRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest, INT yDes
|
||||||
BITMAPINFO *info, UINT coloruse ) DECLSPEC_HIDDEN;
|
BITMAPINFO *info, UINT coloruse ) DECLSPEC_HIDDEN;
|
||||||
extern COLORREF CDECL EMFDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
|
extern COLORREF CDECL EMFDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
|
||||||
extern COLORREF CDECL EMFDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
extern COLORREF CDECL EMFDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL EMFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
|
|
||||||
extern BOOL CDECL EMFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL EMFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL EMFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL EMFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform ) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -130,7 +130,7 @@ static const struct gdi_dc_funcs emfdrv_driver =
|
||||||
EMFDRV_SetPixel, /* pSetPixel */
|
EMFDRV_SetPixel, /* pSetPixel */
|
||||||
EMFDRV_SetTextColor, /* pSetTextColor */
|
EMFDRV_SetTextColor, /* pSetTextColor */
|
||||||
NULL, /* pSetViewportExtEx */
|
NULL, /* pSetViewportExtEx */
|
||||||
EMFDRV_SetViewportOrgEx, /* pSetViewportOrgEx */
|
NULL, /* pSetViewportOrgEx */
|
||||||
EMFDRV_SetWindowExtEx, /* pSetWindowExtEx */
|
EMFDRV_SetWindowExtEx, /* pSetWindowExtEx */
|
||||||
EMFDRV_SetWindowOrgEx, /* pSetWindowOrgEx */
|
EMFDRV_SetWindowOrgEx, /* pSetWindowOrgEx */
|
||||||
EMFDRV_SetWorldTransform, /* pSetWorldTransform */
|
EMFDRV_SetWorldTransform, /* pSetWorldTransform */
|
||||||
|
|
|
@ -99,6 +99,7 @@ extern BOOL METADC_SetStretchBltMode( HDC hdc, INT mode ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL METADC_SetTextAlign( HDC hdc, UINT align ) DECLSPEC_HIDDEN;
|
extern BOOL METADC_SetTextAlign( HDC hdc, UINT align ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL METADC_SetTextJustification( HDC hdc, INT extra, INT breaks ) DECLSPEC_HIDDEN;
|
extern BOOL METADC_SetTextJustification( HDC hdc, INT extra, INT breaks ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL METADC_SetViewportExtEx( HDC hdc, INT x, INT y ) DECLSPEC_HIDDEN;
|
extern BOOL METADC_SetViewportExtEx( HDC hdc, INT x, INT y ) DECLSPEC_HIDDEN;
|
||||||
|
extern BOOL METADC_SetViewportOrgEx( HDC hdc, INT x, INT y ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* enhanced metafiles */
|
/* enhanced metafiles */
|
||||||
extern BOOL EMFDC_AbortPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
extern BOOL EMFDC_AbortPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||||
|
@ -166,5 +167,6 @@ extern BOOL EMFDC_SetStretchBltMode( DC_ATTR *dc_attr, INT mode ) DECLSPEC_HIDDE
|
||||||
extern BOOL EMFDC_SetTextAlign( DC_ATTR *dc_attr, UINT align ) DECLSPEC_HIDDEN;
|
extern BOOL EMFDC_SetTextAlign( DC_ATTR *dc_attr, UINT align ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL EMFDC_SetTextJustification( DC_ATTR *dc_attr, INT extra, INT breaks ) DECLSPEC_HIDDEN;
|
extern BOOL EMFDC_SetTextJustification( DC_ATTR *dc_attr, INT extra, INT breaks ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL EMFDC_SetViewportExtEx( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN;
|
extern BOOL EMFDC_SetViewportExtEx( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN;
|
||||||
|
extern BOOL EMFDC_SetViewportOrgEx( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
#endif /* __WINE_GDI_PRIVATE_H */
|
#endif /* __WINE_GDI_PRIVATE_H */
|
||||||
|
|
|
@ -506,6 +506,23 @@ BOOL WINAPI GetViewportOrgEx( HDC hdc, POINT *point )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetViewportOrgEx (GDI32.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI SetViewportOrgEx( HDC hdc, INT x, INT y, POINT *point )
|
||||||
|
{
|
||||||
|
DC_ATTR *dc_attr;
|
||||||
|
|
||||||
|
if (is_meta_dc( hdc )) return METADC_SetViewportOrgEx( hdc, x, y );
|
||||||
|
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
|
||||||
|
if (dc_attr->emf && !EMFDC_SetViewportOrgEx( dc_attr, x, y )) return FALSE;
|
||||||
|
|
||||||
|
if (point) *point = dc_attr->vport_org;
|
||||||
|
dc_attr->vport_org.x = x;
|
||||||
|
dc_attr->vport_org.y = y;
|
||||||
|
return NtGdiComputeXformCoefficients( hdc );
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetWorldTransform (GDI32.@)
|
* GetWorldTransform (GDI32.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -177,14 +177,6 @@ BOOL CDECL nulldrv_SetViewportExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size )
|
||||||
|
|
||||||
BOOL CDECL nulldrv_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
BOOL CDECL nulldrv_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
||||||
{
|
{
|
||||||
DC *dc = get_nulldrv_dc( dev );
|
|
||||||
|
|
||||||
if (pt)
|
|
||||||
*pt = dc->attr->vport_org;
|
|
||||||
|
|
||||||
dc->attr->vport_org.x = x;
|
|
||||||
dc->attr->vport_org.y = y;
|
|
||||||
DC_UpdateXforms( dc );
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,24 +365,6 @@ BOOL WINAPI NtGdiComputeXformCoefficients( HDC hdc )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* SetViewportOrgEx (GDI32.@)
|
|
||||||
*/
|
|
||||||
BOOL WINAPI SetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
|
||||||
{
|
|
||||||
BOOL ret = FALSE;
|
|
||||||
DC * dc = get_dc_ptr( hdc );
|
|
||||||
|
|
||||||
if (dc)
|
|
||||||
{
|
|
||||||
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetViewportOrgEx );
|
|
||||||
ret = physdev->funcs->pSetViewportOrgEx( physdev, x, y, pt );
|
|
||||||
release_dc_ptr( dc );
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetWindowExtEx (GDI32.@)
|
* SetWindowExtEx (GDI32.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -100,9 +100,9 @@ BOOL METADC_SetViewportExtEx( HDC hdc, INT x, INT y )
|
||||||
return metadc_param2( hdc, META_SETVIEWPORTEXT, x, y );
|
return metadc_param2( hdc, META_SETVIEWPORTEXT, x, y );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CDECL MFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
|
BOOL METADC_SetViewportOrgEx( HDC hdc, INT x, INT y )
|
||||||
{
|
{
|
||||||
return MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y );
|
return metadc_param2( hdc, META_SETVIEWPORTORG, x, y );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
|
BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
|
||||||
|
|
|
@ -195,7 +195,7 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
|
||||||
NULL, /* pSetPixel */
|
NULL, /* pSetPixel */
|
||||||
MFDRV_SetTextColor, /* pSetTextColor */
|
MFDRV_SetTextColor, /* pSetTextColor */
|
||||||
NULL, /* pSetViewportExtEx */
|
NULL, /* pSetViewportExtEx */
|
||||||
MFDRV_SetViewportOrgEx, /* pSetViewportOrgEx */
|
NULL, /* pSetViewportOrgEx */
|
||||||
MFDRV_SetWindowExtEx, /* pSetWindowExtEx */
|
MFDRV_SetWindowExtEx, /* pSetWindowExtEx */
|
||||||
MFDRV_SetWindowOrgEx, /* pSetWindowOrgEx */
|
MFDRV_SetWindowOrgEx, /* pSetWindowOrgEx */
|
||||||
NULL, /* pSetWorldTransform */
|
NULL, /* pSetWorldTransform */
|
||||||
|
|
|
@ -99,7 +99,6 @@ extern COLORREF CDECL MFDRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_H
|
||||||
extern COLORREF CDECL MFDRV_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
extern COLORREF CDECL MFDRV_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||||
extern COLORREF CDECL MFDRV_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
extern COLORREF CDECL MFDRV_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||||
extern COLORREF CDECL MFDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
extern COLORREF CDECL MFDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL MFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
|
|
||||||
extern BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL MFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL MFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL MFDRV_StretchBlt( PHYSDEV devDst, struct bitblt_coords *dst,
|
extern BOOL CDECL MFDRV_StretchBlt( PHYSDEV devDst, struct bitblt_coords *dst,
|
||||||
|
|
Loading…
Reference in New Issue