Author: tkreuzer
Date: Mon Dec 29 13:11:07 2014
New Revision: 65877
URL:
http://svn.reactos.org/svn/reactos?rev=65877&view=rev
Log:
[GDI32]
Add anotations to arc.c, replace an instance of the ugly gfx_worker with an RCAST() macro
Modified:
trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h
trunk/reactos/win32ss/gdi/gdi32/objects/arc.c
Modified: trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/include/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/include/gdi32p.h [iso-8859-1] Mon Dec 29 13:11:07
2014
@@ -39,6 +39,8 @@
/* MACRO ********************************************************************/
#define ROP_USES_SOURCE(Rop) (((Rop) << 2 ^ Rop) & 0xCC0000)
+#define RCAST(_Type, _Value) (*((_Type*)&_Value))
+
/* TYPES *********************************************************************/
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/arc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/arc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/arc.c [iso-8859-1] Mon Dec 29 13:11:07 2014
@@ -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 @@
}
#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 @@
*/
BOOL
WINAPI
-AngleArc(HDC hDC,
- int X,
- int Y,
- DWORD Radius,
- FLOAT StartAngle,
- FLOAT SweepAngle)
-{
- gxf_long worker, worker1;
-
- worker.f = StartAngle;
- worker1.f = SweepAngle;
-
+AngleArc(
+ _In_ HDC hdc,
+ _In_ INT x,
+ _In_ INT y,
+ _In_ DWORD dwRadius,
+ _In_ FLOAT eStartAngle,
+ _In_ FLOAT eSweepAngle)
+{
#if 0
// Handle something other than a normal dc object.
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
@@ -92,21 +87,26 @@
}
}
#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 @@
}
#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 @@
}
#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 @@
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 @@
}
}
#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);
+}
+
+