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",
118 RectSEpts.left,RectSEpts.top,RectSEpts.right,RectSEpts.bottom);
120 DPRINT(
"1: Left: %d, Top: %d, Right: %d, Bottom: %d\n",
121 RectBounds.left,RectBounds.top,RectBounds.right,RectBounds.bottom);
123 CenterX = (RectBounds.right + RectBounds.left) / 2;
124 CenterY = (RectBounds.bottom + RectBounds.top) / 2;
125 AngleEnd =
atan2((RectSEpts.bottom - CenterY), RectSEpts.right - CenterX)*(360.0/(
M_PI*2));
126 AngleStart =
atan2((RectSEpts.top - CenterY), RectSEpts.left - CenterX)*(360.0/(
M_PI*2));
129 if (AngleEnd == AngleStart)
131 AngleStart = AngleEnd + 360.0;
139 abs(RectBounds.right-RectBounds.left),
140 abs(RectBounds.bottom-RectBounds.top),
151 abs(RectBounds.right-RectBounds.left),
152 abs(RectBounds.bottom-RectBounds.top),
159 psurf =
dc->dclevel.pSurface;
170 PUTLINE(CenterX, CenterY, RectSEpts.left, RectSEpts.top,
dc->eboLine);
171 PUTLINE(RectSEpts.right, RectSEpts.bottom, CenterX, CenterY,
dc->eboLine);
174 PUTLINE(RectSEpts.right, RectSEpts.bottom, RectSEpts.left, RectSEpts.top,
dc->eboLine);
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)
329 worker.
l = dwStartAngle;
330 worker1.
l = dwSweepAngle;
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
#define ERROR_INVALID_PARAMETER
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
VOID FASTCALL DC_vUpdateLineBrush(PDC pdc)
FORCEINLINE PDC DC_LockDc(HDC hdc)
#define ERROR_INTERNAL_ERROR
BOOL FASTCALL IntDrawArc(PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, double StartArc, double EndArc, ARCTYPE arctype, PBRUSH pbrush)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
#define ERROR_INVALID_HANDLE
GLint GLint GLint GLint GLint x
BOOL FASTCALL IntFillArc(PDC dc, INT XLeft, INT YLeft, INT Width, INT Height, double StartArc, double EndArc, ARCTYPE arctype)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
#define PUTLINE(x1, y1, x2, y2, BrushInst)
#define KeRestoreFloatingPointState(x)
#define PATH_IsPathOpen(dclevel)
#define NT_SUCCESS(StatCode)
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)
BOOL APIENTRY NtGdiArcInternal(ARCTYPE arctype, HDC hDC, int LeftRect, int TopRect, int RightRect, int BottomRect, int XStartArc, int YStartArc, int XEndArc, int YEndArc)
#define IntLPtoDP(pdc, ppt, count)
#define KeSaveFloatingPointState(x)
#define PEN_ShareUnlockPen(ppen)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
static BOOL FASTCALL IntArc(DC *dc, int Left, int Top, int Right, int Bottom, int XRadialStart, int YRadialStart, int XRadialEnd, int YRadialEnd, ARCTYPE arctype)
static LPHIST_ENTRY Bottom
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
BOOL FASTCALL IntGdiLineTo(DC *dc, int XEnd, int YEnd)
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)
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
GLint GLint GLint GLint GLint GLint y
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
BOOL FASTCALL IntGdiMoveToEx(DC *dc, int X, int Y, LPPOINT Point)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
BOOL APIENTRY NtGdiAngleArc(IN HDC hDC, IN INT x, IN INT y, IN DWORD dwRadius, IN DWORD dwStartAngle, IN DWORD dwSweepAngle)
PBRUSH FASTCALL PEN_ShareLockPen(HPEN hobj)
static SERVICE_STATUS status
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
VOID FASTCALL DC_vUpdateFillBrush(PDC pdc)