Implemented the SetArcDirection metarecord in EMF driver.

This commit is contained in:
Dave Belanger 2003-10-04 03:08:25 +00:00 committed by Alexandre Julliard
parent e3f6ed2d68
commit 325f646fdc
7 changed files with 26 additions and 0 deletions

View File

@ -153,6 +153,7 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC(SelectFont); GET_FUNC(SelectFont);
GET_FUNC(SelectPalette); GET_FUNC(SelectPalette);
GET_FUNC(SelectPen); GET_FUNC(SelectPen);
GET_FUNC(SetArcDirection);
GET_FUNC(SetBitmapBits); GET_FUNC(SetBitmapBits);
GET_FUNC(SetBkColor); GET_FUNC(SetBkColor);
GET_FUNC(SetBkMode); GET_FUNC(SetBkMode);

View File

@ -119,6 +119,7 @@ extern HBRUSH EMFDRV_SelectBrush( PHYSDEV dev, HBRUSH handle );
extern BOOL EMFDRV_SelectClipPath( PHYSDEV dev, INT iMode ); extern BOOL EMFDRV_SelectClipPath( PHYSDEV dev, INT iMode );
extern HFONT EMFDRV_SelectFont( PHYSDEV dev, HFONT handle ); extern HFONT EMFDRV_SelectFont( PHYSDEV dev, HFONT handle );
extern HPEN EMFDRV_SelectPen( PHYSDEV dev, HPEN handle ); extern HPEN EMFDRV_SelectPen( PHYSDEV dev, HPEN handle );
extern INT EMFDRV_SetArcDirection( PHYSDEV dev, INT arcDirection );
extern COLORREF EMFDRV_SetBkColor( PHYSDEV dev, COLORREF color ); extern COLORREF EMFDRV_SetBkColor( PHYSDEV dev, COLORREF color );
extern INT EMFDRV_SetBkMode( PHYSDEV dev, INT mode ); extern INT EMFDRV_SetBkMode( PHYSDEV dev, INT mode );
extern INT EMFDRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest, INT yDest, extern INT EMFDRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest, INT yDest,

View File

@ -693,3 +693,20 @@ BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
HeapFree( GetProcessHeap(), 0, pemr ); HeapFree( GetProcessHeap(), 0, pemr );
return ret; return ret;
} }
/**********************************************************************
* EMFDRV_SetArcDirection
*/
INT EMFDRV_SetArcDirection(PHYSDEV dev, INT arcDirection)
{
EMRSETARCDIRECTION emr;
emr.emr.iType = EMR_SETARCDIRECTION;
emr.emr.nSize = sizeof(emr);
emr.iArcDirection = arcDirection;
EMFDRV_WriteRecord(dev, &emr.emr);
/* We don't know the old arc direction and we don't care... */
return 0;
}

View File

@ -112,6 +112,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_SelectFont, /* pSelectFont */ EMFDRV_SelectFont, /* pSelectFont */
NULL, /* pSelectPalette */ NULL, /* pSelectPalette */
EMFDRV_SelectPen, /* pSelectPen */ EMFDRV_SelectPen, /* pSelectPen */
EMFDRV_SetArcDirection, /* pSetArcDirection */
NULL, /* pSetBitmapBits */ NULL, /* pSetBitmapBits */
EMFDRV_SetBkColor, /* pSetBkColor */ EMFDRV_SetBkColor, /* pSetBkColor */
EMFDRV_SetBkMode, /* pSetBkMode */ EMFDRV_SetBkMode, /* pSetBkMode */

View File

@ -113,6 +113,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SelectFont, /* pSelectFont */ MFDRV_SelectFont, /* pSelectFont */
MFDRV_SelectPalette, /* pSelectPalette */ MFDRV_SelectPalette, /* pSelectPalette */
MFDRV_SelectPen, /* pSelectPen */ MFDRV_SelectPen, /* pSelectPen */
NULL, /* pSetArcDirection */
NULL, /* pSetBitmapBits */ NULL, /* pSetBitmapBits */
MFDRV_SetBkColor, /* pSetBkColor */ MFDRV_SetBkColor, /* pSetBkColor */
MFDRV_SetBkMode, /* pSetBkMode */ MFDRV_SetBkMode, /* pSetBkMode */

View File

@ -252,6 +252,7 @@ typedef struct tagDC_FUNCS
HFONT (*pSelectFont)(PHYSDEV,HFONT); HFONT (*pSelectFont)(PHYSDEV,HFONT);
HPALETTE (*pSelectPalette)(PHYSDEV,HPALETTE,BOOL); HPALETTE (*pSelectPalette)(PHYSDEV,HPALETTE,BOOL);
HPEN (*pSelectPen)(PHYSDEV,HPEN); HPEN (*pSelectPen)(PHYSDEV,HPEN);
INT (*pSetArcDirection)(PHYSDEV,INT);
LONG (*pSetBitmapBits)(HBITMAP,const void*,LONG); LONG (*pSetBitmapBits)(HBITMAP,const void*,LONG);
COLORREF (*pSetBkColor)(PHYSDEV,COLORREF); COLORREF (*pSetBkColor)(PHYSDEV,COLORREF);
INT (*pSetBkMode)(PHYSDEV,INT); INT (*pSetBkMode)(PHYSDEV,INT);

View File

@ -987,6 +987,10 @@ INT WINAPI SetArcDirection( HDC hdc, INT nDirection )
if ((dc = DC_GetDCPtr( hdc ))) if ((dc = DC_GetDCPtr( hdc )))
{ {
if (dc->funcs->pSetArcDirection)
{
dc->funcs->pSetArcDirection(dc->physDev, nDirection);
}
nOldDirection = dc->ArcDirection; nOldDirection = dc->ArcDirection;
dc->ArcDirection = nDirection; dc->ArcDirection = nDirection;
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );