gdi32: Implement the MoveTo entry point in the path driver.
This commit is contained in:
parent
8a7bf0a2ab
commit
2c1ec7fc3b
|
@ -325,7 +325,6 @@ extern void PATH_DestroyGdiPath(GdiPath *pPath) DECLSPEC_HIDDEN;
|
|||
extern BOOL PATH_SavePath( DC *dst, DC *src ) DECLSPEC_HIDDEN;
|
||||
extern BOOL PATH_RestorePath( DC *dst, DC *src ) DECLSPEC_HIDDEN;
|
||||
|
||||
extern BOOL PATH_MoveTo(DC *dc) DECLSPEC_HIDDEN;
|
||||
extern BOOL PATH_LineTo(DC *dc, INT x, INT y) DECLSPEC_HIDDEN;
|
||||
extern BOOL PATH_Rectangle(DC *dc, INT x1, INT y1, INT x2, INT y2) DECLSPEC_HIDDEN;
|
||||
extern BOOL PATH_ExtTextOut(DC *dc, INT x, INT y, UINT flags, const RECT *lprc,
|
||||
|
|
|
@ -258,7 +258,8 @@ BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
|
|||
*/
|
||||
BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
BOOL ret;
|
||||
PHYSDEV physdev;
|
||||
DC * dc = get_dc_ptr( hdc );
|
||||
|
||||
if(!dc) return FALSE;
|
||||
|
@ -270,12 +271,8 @@ BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, LPPOINT pt )
|
|||
dc->CursPosX = x;
|
||||
dc->CursPosY = y;
|
||||
|
||||
if(PATH_IsPathOpen(dc->path)) ret = PATH_MoveTo(dc);
|
||||
else
|
||||
{
|
||||
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pMoveTo );
|
||||
ret = physdev->funcs->pMoveTo( physdev, x, y );
|
||||
}
|
||||
physdev = GET_DC_PHYSDEV( dc, pMoveTo );
|
||||
ret = physdev->funcs->pMoveTo( physdev, x, y );
|
||||
release_dc_ptr( dc );
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -884,25 +884,15 @@ BOOL PATH_RestorePath( DC *dst, DC *src )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* PATH_MoveTo
|
||||
*
|
||||
* Should be called when a MoveTo is performed on a DC that has an
|
||||
* open path. This starts a new stroke. Returns TRUE if successful, else
|
||||
* FALSE.
|
||||
|
||||
/*************************************************************
|
||||
* pathdrv_MoveTo
|
||||
*/
|
||||
BOOL PATH_MoveTo(DC *dc)
|
||||
static BOOL pathdrv_MoveTo( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
GdiPath *pPath = &dc->path;
|
||||
|
||||
/* Check that path is open */
|
||||
if(pPath->state!=PATH_Open)
|
||||
/* FIXME: Do we have to call SetLastError? */
|
||||
return FALSE;
|
||||
|
||||
/* Start a new stroke */
|
||||
pPath->newStroke=TRUE;
|
||||
|
||||
return TRUE;
|
||||
struct path_physdev *physdev = get_path_physdev( dev );
|
||||
physdev->path->newStroke = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* PATH_LineTo
|
||||
|
@ -2372,7 +2362,7 @@ const struct gdi_dc_funcs path_driver =
|
|||
NULL, /* pInvertRgn */
|
||||
NULL, /* pLineTo */
|
||||
NULL, /* pModifyWorldTransform */
|
||||
NULL, /* pMoveTo */
|
||||
pathdrv_MoveTo, /* pMoveTo */
|
||||
NULL, /* pOffsetClipRgn */
|
||||
NULL, /* pOffsetViewportOrg */
|
||||
NULL, /* pOffsetWindowOrg */
|
||||
|
|
Loading…
Reference in New Issue