Commit d3534c39 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Optimized {,p}MoveTo{,Ex}{,16}.

parent 56b17436
......@@ -61,7 +61,7 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver =
NULL, /* pIntersectClipRect */
NULL, /* pIntersectVisRect */
TTYDRV_DC_LineTo, /* pLineTo */
NULL, /* pMoveToEx */
NULL, /* pMoveTo */
NULL, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg (optional) */
NULL, /* pOffsetWindowOrg (optional) */
......
......@@ -65,7 +65,7 @@ static const DC_FUNCTIONS PSDRV_Funcs =
NULL, /* pIntersectClipRect */
NULL, /* pInvertRgn */
PSDRV_LineTo, /* pLineTo */
NULL, /* pMoveToEx */
NULL, /* pMoveTo */
NULL, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg (optional) */
NULL, /* pOffsetWindowOrg (optional) */
......
......@@ -15,10 +15,10 @@
DEFAULT_DEBUG_CHANNEL(enhmetafile);
/**********************************************************************
* EMFDRV_MoveToEx
* EMFDRV_MoveTo
*/
BOOL
EMFDRV_MoveToEx(DC *dc,INT x,INT y,LPPOINT pt)
EMFDRV_MoveTo(DC *dc, INT x, INT y)
{
EMRMOVETOEX emr;
......
......@@ -62,7 +62,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_IntersectClipRect, /* pIntersectClipRect */
EMFDRV_InvertRgn, /* pInvertRgn */
EMFDRV_LineTo, /* pLineTo */
EMFDRV_MoveToEx, /* pMoveToEx */
EMFDRV_MoveTo, /* pMoveTo */
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg */
NULL, /* pOffsetWindowOrg */
......
......@@ -16,10 +16,10 @@
DEFAULT_DEBUG_CHANNEL(metafile);
/**********************************************************************
* MFDRV_MoveToEx
* MFDRV_MoveTo
*/
BOOL
MFDRV_MoveToEx(DC *dc,INT x,INT y,LPPOINT pt)
MFDRV_MoveTo(DC *dc, INT x, INT y)
{
return MFDRV_MetaParam2(dc,META_MOVETO,x,y);
}
......
......@@ -61,7 +61,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_IntersectClipRect, /* pIntersectClipRect */
MFDRV_InvertRgn, /* pInvertRgn */
MFDRV_LineTo, /* pLineTo */
MFDRV_MoveToEx, /* pMoveToEx */
MFDRV_MoveTo, /* pMoveTo */
MFDRV_OffsetClipRgn, /* pOffsetClipRgn */
MFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
MFDRV_OffsetWindowOrg, /* pOffsetWindowOrg */
......
......@@ -65,7 +65,7 @@ extern INT MFDRV_IntersectClipRect( DC *dc, INT left, INT top, INT right, INT
bottom );
extern BOOL MFDRV_InvertRgn( DC *dc, HRGN hrgn );
extern BOOL MFDRV_LineTo( DC *dc, INT x, INT y );
extern BOOL MFDRV_MoveToEx( DC *dc, INT x, INT y, LPPOINT pt );
extern BOOL MFDRV_MoveTo( DC *dc, INT x, INT y );
extern INT MFDRV_OffsetClipRgn( DC *dc, INT x, INT y );
extern BOOL MFDRV_OffsetViewportOrg( DC *dc, INT x, INT y );
extern BOOL MFDRV_OffsetWindowOrg( DC *dc, INT x, INT y );
......
......@@ -59,10 +59,9 @@ BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
*/
DWORD WINAPI MoveTo16( HDC16 hdc, INT16 x, INT16 y )
{
POINT16 pt;
POINT pt;
if (!MoveToEx16(hdc,x,y,&pt))
return 0;
if (!MoveToEx( (HDC)hdc, x, y, &pt )) return 0;
return MAKELONG(pt.x,pt.y);
}
......@@ -77,7 +76,6 @@ BOOL16 WINAPI MoveToEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
if (!MoveToEx( (HDC)hdc, (INT)x, (INT)y, &pt32 )) return FALSE;
if (pt) CONV_POINT32TO16( &pt32, pt );
return TRUE;
}
......@@ -87,7 +85,7 @@ BOOL16 WINAPI MoveToEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, LPPOINT pt )
{
BOOL ret = TRUE;
DC * dc = DC_GetDCUpdate( hdc );
DC * dc = DC_GetDCPtr( hdc );
if(!dc) return FALSE;
......@@ -99,7 +97,7 @@ BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, LPPOINT pt )
dc->CursPosY = y;
if(PATH_IsPathOpen(dc->path)) ret = PATH_MoveTo(dc);
else if (dc->funcs->pMoveToEx) ret = dc->funcs->pMoveToEx(dc,x,y,pt);
else if (dc->funcs->pMoveTo) ret = dc->funcs->pMoveTo(dc,x,y);
GDI_ReleaseObj( hdc );
return ret;
}
......
......@@ -9,23 +9,7 @@
#include "win16drv.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win16drv)
/**********************************************************************
* WIN16DRV_MoveToEx
*/
BOOL
WIN16DRV_MoveToEx(DC *dc,INT x,INT y,LPPOINT pt)
{
if (pt)
{
pt->x = dc->CursPosX;
pt->y = dc->CursPosY;
}
dc->CursPosX = x;
dc->CursPosY = y;
return TRUE;
}
DEFAULT_DEBUG_CHANNEL(win16drv);
/***********************************************************************
* WIN16DRV_LineTo
......
......@@ -86,7 +86,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL, /* pIntersectClipRect */
NULL, /* pInvertRgn */
WIN16DRV_LineTo, /* pLineTo */
WIN16DRV_MoveToEx, /* pMoveToEx */
NULL, /* pMoveTo */
NULL, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrgEx */
NULL, /* pOffsetWindowOrgEx */
......
......@@ -71,7 +71,7 @@ const DC_FUNCTIONS X11DRV_DC_Funcs =
NULL, /* pIntersectClipRect */
NULL, /* pInvertRgn */
X11DRV_LineTo, /* pLineTo */
NULL, /* pMoveToEx */
NULL, /* pMoveTo */
NULL, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg (optional) */
NULL, /* pOffsetWindowOrg (optional) */
......
......@@ -56,7 +56,7 @@ extern INT EMFDRV_IntersectClipRect( DC *dc, INT left, INT top, INT right,
INT bottom );
extern BOOL EMFDRV_InvertRgn( DC *dc, HRGN hrgn );
extern BOOL EMFDRV_LineTo( DC *dc, INT x, INT y );
extern BOOL EMFDRV_MoveToEx( DC *dc, INT x, INT y, LPPOINT pt);
extern BOOL EMFDRV_MoveTo( DC *dc, INT x, INT y );
extern INT EMFDRV_OffsetClipRgn( DC *dc, INT x, INT y );
extern BOOL EMFDRV_OffsetViewportOrg( DC *dc, INT x, INT y );
extern BOOL EMFDRV_OffsetWindowOrg( DC *dc, INT x, INT y );
......
......@@ -207,7 +207,7 @@ typedef struct tagDC_FUNCS
INT (*pIntersectClipRect)(DC*,INT,INT,INT,INT);
BOOL (*pInvertRgn)(DC*,HRGN);
BOOL (*pLineTo)(DC*,INT,INT);
BOOL (*pMoveToEx)(DC*,INT,INT,LPPOINT);
BOOL (*pMoveTo)(DC*,INT,INT);
INT (*pOffsetClipRgn)(DC*,INT,INT);
BOOL (*pOffsetViewportOrg)(DC*,INT,INT);
BOOL (*pOffsetWindowOrg)(DC*,INT,INT);
......
......@@ -217,7 +217,6 @@ extern BOOL WIN16DRV_ExtTextOut( DC *dc, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR str, UINT count,
const INT *lpDx );
extern BOOL WIN16DRV_LineTo( DC *dc, INT x, INT y );
extern BOOL WIN16DRV_MoveToEx(DC *dc,INT x,INT y,LPPOINT pt);
extern BOOL WIN16DRV_Polygon(DC *dc, const POINT* pt, INT count );
extern BOOL WIN16DRV_Polyline(DC *dc, const POINT* pt, INT count );
extern BOOL WIN16DRV_Rectangle(DC *dc, INT left, INT top, INT right, INT bottom);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment