9#define PUTPIXEL(x,y,BrushInst) \
10 ret = ret && IntEngLineTo(&psurf->SurfObj, \
12 &BrushInst.BrushObject, \
15 ROP2_TO_MIX(pdcattr->jROP2));
17#define PUTLINE(x1,y1,x2,y2,BrushInst) \
18 ret = ret && IntEngLineTo(&psurf->SurfObj, \
20 &BrushInst.BrushObject, \
23 ROP2_TO_MIX(pdcattr->jROP2));
40 RECTL RectBounds, RectSEpts;
44 LONG PenWidth, PenOrigWidth;
45 double AngleStart, AngleEnd;
46 LONG CenterX, CenterY;
50 INT tmp = Right; Right = Left; Left = tmp;
63 if ((Right - Left == 1) || (
Bottom -
Top == 1))
68 pdcattr =
dc->pdcattr;
78 PenOrigWidth = PenWidth = pbrPen->lWidth;
79 if (pbrPen->ulPenStyle ==
PS_NULL) PenWidth = 0;
83 if (2*PenWidth > (Right - Left)) PenWidth = (Right -Left + 1)/2;
86 Right -= (PenWidth - 1) / 2;
88 Bottom -= (PenWidth - 1) / 2;
91 if (!PenWidth) PenWidth = 1;
92 pbrPen->lWidth = PenWidth;
94 RectBounds.
left = Left;
95 RectBounds.
right = Right;
99 RectSEpts.
left = XRadialStart;
100 RectSEpts.
top = YRadialStart;
101 RectSEpts.
right = XRadialEnd;
102 RectSEpts.
bottom = YRadialEnd;
107 RectBounds.
left +=
dc->ptlDCOrig.x;
108 RectBounds.
right +=
dc->ptlDCOrig.x;
109 RectBounds.
top +=
dc->ptlDCOrig.y;
110 RectBounds.
bottom +=
dc->ptlDCOrig.y;
112 RectSEpts.
left +=
dc->ptlDCOrig.x;
113 RectSEpts.
top +=
dc->ptlDCOrig.y;
114 RectSEpts.
right +=
dc->ptlDCOrig.x;
115 RectSEpts.
bottom +=
dc->ptlDCOrig.y;
117 DPRINT(
"1: StartX: %d, StartY: %d, EndX: %d, EndY: %d\n",
120 DPRINT(
"1: Left: %d, Top: %d, Right: %d, Bottom: %d\n",
123 CenterX = (RectBounds.
right + RectBounds.
left) / 2;
124 CenterY = (RectBounds.
bottom + RectBounds.
top) / 2;
126 AngleStart =
atan2((RectSEpts.
top - CenterY), RectSEpts.
left - CenterX)*(360.0/(
M_PI*2));
129 if (AngleEnd == AngleStart)
131 AngleStart = AngleEnd + 360.0;
159 psurf =
dc->dclevel.pSurface;
176 pbrPen->lWidth = PenOrigWidth;
199 DPRINT(
"StartX: %d, StartY: %d, EndX: %d, EndY: %d\n",
200 XStartArc,YStartArc,XEndArc,YEndArc);
201 DPRINT(
"Left: %d, Top: %d, Right: %d, Bottom: %d\n",
202 LeftRect,TopRect,RightRect,BottomRect);
204 if ((LeftRect == RightRect) || (TopRect == BottomRect))
return TRUE;
265 x2 =
x + (
INT)(
cos(((eStartAngle+eSweepAngle)/360)*(
M_PI*2)) * dwRadius);
266 y2 =
y - (
INT)(
sin(((eStartAngle+eSweepAngle)/360)*(
M_PI*2)) * dwRadius);
272 if (eSweepAngle >= 0)
273 pDC->dclevel.flPath &= ~DCPATH_CLOCKWISE;
329 worker.
l = dwStartAngle;
330 worker1.
l = dwSweepAngle;
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
static LPHIST_ENTRY Bottom
static BOOLEAN IntLPtoDP(DC *pdc, PPOINTL ppt, UINT count)
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
VOID FASTCALL DC_vUpdateLineBrush(PDC pdc)
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
VOID FASTCALL DC_vUpdateFillBrush(PDC pdc)
FORCEINLINE PDC DC_LockDc(HDC hdc)
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
BOOL FASTCALL IntDrawArc(PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, double StartArc, double EndArc, ARCTYPE arctype, PBRUSH pbrush)
BOOL FASTCALL IntFillArc(PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, double StartArc, double EndArc, ARCTYPE arctype)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
BOOL FASTCALL IntGdiLineTo(DC *dc, int XEnd, int YEnd)
BOOL FASTCALL IntGdiMoveToEx(DC *dc, int X, int Y, LPPOINT Point)
#define KeSaveFloatingPointState(x)
#define KeRestoreFloatingPointState(x)
BOOL FASTCALL IntGdiAngleArc(PDC pDC, INT x, INT y, DWORD dwRadius, FLOAT eStartAngle, FLOAT eSweepAngle)
BOOL FASTCALL IntGdiArcInternal(ARCTYPE arctype, DC *dc, int LeftRect, int TopRect, int RightRect, int BottomRect, int XStartArc, int YStartArc, int XEndArc, int YEndArc)
#define PUTLINE(x1, y1, x2, y2, BrushInst)
static BOOL FASTCALL IntArc(DC *dc, int Left, int Top, int Right, int Bottom, int XRadialStart, int YRadialStart, int XRadialEnd, int YRadialEnd, ARCTYPE arctype)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiAngleArc(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ DWORD dwRadius, _In_ DWORD dwStartAngle, _In_ DWORD dwSweepAngle)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiArcInternal(_In_ ARCTYPE arctype, _In_ HDC hdc, _In_ INT x1, _In_ INT y1, _In_ INT x2, _In_ INT y2, _In_ INT x3, _In_ INT y3, _In_ INT x4, _In_ INT y4)
#define PATH_IsPathOpen(dclevel)
#define PEN_ShareUnlockPen(ppen)
BOOL FASTCALL PATH_Arc(PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd, INT direction, INT lines)
PBRUSH FASTCALL PEN_ShareLockPen(HPEN hobj)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define ERROR_INTERNAL_ERROR