Add anotations to arc.c, replace an instance of the ugly gfx_worker with an RCAST() macro

svn path=/trunk/; revision=65877
This commit is contained in:
Timo Kreuzer 2014-12-29 13:11:07 +00:00
parent f27f53b630
commit 45309fa8bf
2 changed files with 88 additions and 78 deletions

View file

@ -39,6 +39,8 @@ typedef INT
/* MACRO ********************************************************************/
#define ROP_USES_SOURCE(Rop) (((Rop) << 2 ^ Rop) & 0xCC0000)
#define RCAST(_Type, _Value) (*((_Type*)&_Value))
/* TYPES *********************************************************************/

View file

@ -3,16 +3,15 @@
BOOL
WINAPI
Arc(
HDC hDC,
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect,
int nXStartArc,
int nYStartArc,
int nXEndArc,
int nYEndArc
)
_In_ HDC hdc,
_In_ INT xLeft,
_In_ INT yTop,
_In_ INT xRight,
_In_ INT yBottom,
_In_ INT xStartArc,
_In_ INT yStartArc,
_In_ INT xEndArc,
_In_ INT yEndArc)
{
#if 0
// Handle something other than a normal dc object.
@ -40,15 +39,15 @@ Arc(
}
#endif
return NtGdiArcInternal(GdiTypeArc,
hDC,
nLeftRect,
nTopRect,
nRightRect,
nBottomRect,
nXStartArc,
nYStartArc,
nXEndArc,
nYEndArc);
hdc,
xLeft,
yTop,
xRight,
yBottom,
xStartArc,
yStartArc,
xEndArc,
yEndArc);
}
@ -57,18 +56,14 @@ Arc(
*/
BOOL
WINAPI
AngleArc(HDC hDC,
int X,
int Y,
DWORD Radius,
FLOAT StartAngle,
FLOAT SweepAngle)
AngleArc(
_In_ HDC hdc,
_In_ INT x,
_In_ INT y,
_In_ DWORD dwRadius,
_In_ FLOAT eStartAngle,
_In_ FLOAT eSweepAngle)
{
gxf_long worker, worker1;
worker.f = StartAngle;
worker1.f = SweepAngle;
#if 0
// Handle something other than a normal dc object.
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
@ -92,21 +87,26 @@ AngleArc(HDC hDC,
}
}
#endif
return NtGdiAngleArc(hDC, X, Y, Radius, (DWORD)worker.l, (DWORD)worker1.l);
return NtGdiAngleArc(hdc,
x,
y,
dwRadius,
RCAST(DWORD, eStartAngle),
RCAST(DWORD, eSweepAngle));
}
BOOL
WINAPI
ArcTo(
HDC hDC,
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect,
int nXRadial1,
int nYRadial1,
int nXRadial2,
int nYRadial2)
_In_ HDC hdc,
_In_ INT xLeft,
_In_ INT yTop,
_In_ INT xRight,
_In_ INT yBottom,
_In_ INT xRadial1,
_In_ INT yRadial1,
_In_ INT xRadial2,
_In_ INT yRadial2)
{
#if 0
// Handle something other than a normal dc object.
@ -132,29 +132,29 @@ ArcTo(
}
#endif
return NtGdiArcInternal(GdiTypeArcTo,
hDC,
nLeftRect,
nTopRect,
nRightRect,
nBottomRect,
nXRadial1,
nYRadial1,
nXRadial2,
nYRadial2);
hdc,
xLeft,
yTop,
xRight,
yBottom,
xRadial1,
yRadial1,
xRadial2,
yRadial2);
}
BOOL
WINAPI
Chord(
HDC hDC,
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect,
int nXRadial1,
int nYRadial1,
int nXRadial2,
int nYRadial2)
_In_ HDC hdc,
_In_ INT xLeft,
_In_ INT yTop,
_In_ INT xRight,
_In_ INT yBottom,
_In_ INT xRadial1,
_In_ INT yRadial1,
_In_ INT xRadial2,
_In_ INT yRadial2)
{
#if 0
// Handle something other than a normal dc object.
@ -180,15 +180,15 @@ Chord(
}
#endif
return NtGdiArcInternal(GdiTypeChord,
hDC,
nLeftRect,
nTopRect,
nRightRect,
nBottomRect,
nXRadial1,
nYRadial1,
nXRadial2,
nYRadial2);
hdc,
xLeft,
yTop,
xRight,
yBottom,
xRadial1,
yRadial1,
xRadial2,
yRadial2);
}
@ -198,16 +198,15 @@ Chord(
BOOL
WINAPI
Pie(
HDC hDC,
int a1,
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8
)
_In_ HDC hdc,
_In_ INT xLeft,
_In_ INT yTop,
_In_ INT xRight,
_In_ INT yBottom,
_In_ INT xRadial1,
_In_ INT yRadial1,
_In_ INT xRadial2,
_In_ INT yRadial2)
{
#if 0
// Handle something other than a normal dc object.
@ -232,7 +231,16 @@ Pie(
}
}
#endif
return NtGdiArcInternal(GdiTypePie, hDC, a1, a2, a3, a4, a5, a6, a7, a8);
return NtGdiArcInternal(GdiTypePie,
hdc,
xLeft,
yTop,
xRight,
yBottom,
xRadial1,
yRadial1,
xRadial2,
yRadial2);
}