Реферат: Разработка программы на языке С для построения сложных геометрических фигур на плоскости
r.SetRect(x3 - r3, -(y3 - r3), x3 + r3, -(y3 + r3));
r.OffsetRect(x0, y0);
pDC->Arc(&r, CPoint(r.left, r.top), CPoint(r.left, r.top));
CPen pen(PS_SOLID, 7, (COLORREF)(0));
CPen* penLast = pDC->SelectObject(&pen);
pDC->MoveTo(X1 + x0, -Y1 + y0);
pDC->LineTo(X1 + x0, -Y1 + y0);
pDC->MoveTo(x2 + x0, -y2 + y0);
pDC->LineTo(x2 + x0, -y2 + y0);
pDC->MoveTo(x3 + x0, -y3 + y0);
pDC->LineTo(x3 + x0, -y3 + y0);
r.SetRect(x2 - r2, -(y2 - r2), x2 + r2, -(y2 + r2));
r.OffsetRect(x0, y0);
pDC->Arc(&r, CPoint(r.CenterPoint().x, r.bottom), CPoint(r.CenterPoint().x, r.top));
r.SetRect(x3 - r3, -(y3 - r3), x3 + r3, -(y3 + r3));
r.OffsetRect(x0, y0);
pDC->Arc(&r, CPoint(r.CenterPoint().x, r.bottom), CPoint(r.CenterPoint().x, r.top));
//rb
int lu = Y1 + sqrt(R1*R1 - (X1 - x3)*(X1 - x3));
int ru = Y1 + sqrt(R1*R1 - (x2 - X1)*(x2 - X1));
int rd = Y1 -(ru - Y1);
int ld = Y1 -(lu - Y1);
pDC->MoveTo(x2 + x0, -(y2 - r2) + y0);
pDC->LineTo(x2 + x0, -rd + y0);
pDC->MoveTo(x2 + x0, -(y2 + r2) + y0);
pDC->LineTo(x2 + x0, -ru + y0);
pDC->MoveTo(x3 + x0, -(y3 - r3) + y0);
pDC->LineTo(x3 + x0, -ld + y0);
pDC->MoveTo(x3 + x0, -(y3 + r3) + y0);