2021-07-17 14:56:39 +00:00
|
|
|
/*
|
|
|
|
* GDI Device Context functions
|
|
|
|
*
|
|
|
|
* Copyright 1993, 1994 Alexandre Julliard
|
|
|
|
* Copyright 1997 Bertho A. Stultiens
|
|
|
|
* 1999 Huw D M Davies
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "gdi_private.h"
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* LineTo (GDI32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
|
|
|
|
{
|
|
|
|
TRACE( "%p, (%d, %d)\n", hdc, x, y );
|
2021-07-17 15:00:55 +00:00
|
|
|
|
|
|
|
if (is_meta_dc( hdc )) return METADC_LineTo( hdc, x, y );
|
2021-07-17 14:56:39 +00:00
|
|
|
return NtGdiLineTo( hdc, x, y );
|
|
|
|
}
|
2021-07-17 14:56:46 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* MoveToEx (GDI32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, POINT *pt )
|
|
|
|
{
|
|
|
|
TRACE( "%p, (%d, %d), %p\n", hdc, x, y, pt );
|
2021-07-17 15:20:11 +00:00
|
|
|
|
|
|
|
if (is_meta_dc( hdc )) return METADC_MoveTo( hdc, x, y );
|
2021-07-17 14:56:46 +00:00
|
|
|
return NtGdiMoveTo( hdc, x, y, pt );
|
|
|
|
}
|
2021-07-17 14:56:54 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* Arc (GDI32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right, INT bottom,
|
|
|
|
INT xstart, INT ystart, INT xend, INT yend )
|
|
|
|
{
|
|
|
|
TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top,
|
|
|
|
right, bottom, xstart, ystart, xend, yend );
|
|
|
|
return NtGdiArcInternal( NtGdiArc, hdc, left, top, right, bottom,
|
|
|
|
xstart, ystart, xend, yend );
|
|
|
|
}
|
2021-07-17 14:57:06 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* ArcTo (GDI32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI ArcTo( HDC hdc, INT left, INT top, INT right, INT bottom,
|
|
|
|
INT xstart, INT ystart, INT xend, INT yend )
|
|
|
|
{
|
|
|
|
TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top,
|
|
|
|
right, bottom, xstart, ystart, xend, yend );
|
|
|
|
|
|
|
|
return NtGdiArcInternal( NtGdiArcTo, hdc, left, top, right, bottom,
|
|
|
|
xstart, ystart, xend, yend );
|
|
|
|
}
|
2021-07-17 14:57:16 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* Chord (GDI32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI Chord( HDC hdc, INT left, INT top, INT right, INT bottom,
|
|
|
|
INT xstart, INT ystart, INT xend, INT yend )
|
|
|
|
{
|
|
|
|
TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top,
|
|
|
|
right, bottom, xstart, ystart, xend, yend );
|
|
|
|
|
2021-07-17 15:01:18 +00:00
|
|
|
if (is_meta_dc( hdc ))
|
|
|
|
return METADC_Chord( hdc, left, top, right, bottom,
|
|
|
|
xstart, ystart, xend, yend );
|
|
|
|
|
2021-07-17 14:57:16 +00:00
|
|
|
return NtGdiArcInternal( NtGdiChord, hdc, left, top, right, bottom,
|
|
|
|
xstart, ystart, xend, yend );
|
|
|
|
}
|
2021-07-17 14:57:25 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* Pie (GDI32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI Pie( HDC hdc, INT left, INT top, INT right, INT bottom,
|
|
|
|
INT xstart, INT ystart, INT xend, INT yend )
|
|
|
|
{
|
|
|
|
TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top,
|
|
|
|
right, bottom, xstart, ystart, xend, yend );
|
|
|
|
|
2021-07-17 15:01:18 +00:00
|
|
|
if (is_meta_dc( hdc ))
|
|
|
|
return METADC_Pie( hdc, left, top, right, bottom,
|
|
|
|
xstart, ystart, xend, yend );
|
|
|
|
|
2021-07-17 14:57:25 +00:00
|
|
|
return NtGdiArcInternal( NtGdiPie, hdc, left, top, right, bottom,
|
|
|
|
xstart, ystart, xend, yend );
|
|
|
|
}
|