+ long x2 = (x+w);
+ long y2 = (y+h);
+
+ BeginDrawing();
+
+ const double deg2rad = 3.14159265359 / 180.0;
+ int rx1 = XLOG2DEV(x+w/2);
+ int ry1 = YLOG2DEV(y+h/2);
+ int rx2 = rx1;
+ int ry2 = ry1;
+ rx1 += (int)(100.0 * abs(w) * cos(sa * deg2rad));
+ ry1 -= (int)(100.0 * abs(h) * m_signY * sin(sa * deg2rad));
+ rx2 += (int)(100.0 * abs(w) * cos(ea * deg2rad));
+ ry2 -= (int)(100.0 * abs(h) * m_signY * sin(ea * deg2rad));
+
+ // draw pie with NULL_PEN first and then outline otherwise a line is
+ // drawn from the start and end points to the centre
+ HPEN orig_pen = ::SelectObject((HDC) m_hDC, ::GetStockObject(NULL_PEN));
+ if (m_signY > 0)
+ {
+ (void)Pie((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2)+1, YLOG2DEV(y2)+1,
+ rx1, ry1, rx2, ry2);
+ }
+ else
+ {
+ (void)Pie((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y)-1, XLOG2DEV(x2)+1, YLOG2DEV(y2),
+ rx1, ry1-1, rx2, ry2-1);
+ }
+ ::SelectObject((HDC) m_hDC, orig_pen);
+ (void)Arc((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2),
+ rx1, ry1, rx2, ry2);
+
+ EndDrawing();
+
+ CalcBoundingBox(x, y);
+ CalcBoundingBox(x2, y2);
+}