Скачиваний:
13
Добавлен:
01.05.2014
Размер:
946 б
Скачать
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
#include <roundonboard.cpp>

void main(){
roundonboard A;
ColorRound B;
int a=0;
double x0,y0,r,col;
Point O(100,100,a);
ColorRound C(O,50,3,a);
O.SetXY(50,50);
B.SetCenter(O);
B.SetRadius(30);
O.SetXY(200,200);
A.SetTop(3,O);
A.insert(B);
A.insert(C);
int GrDr,GrMod,rez;
GrDr=DETECT;
initgraph(&GrDr,&GrMod," ");
rez=graphresult();
if (rez!=grOk)
 {
  printf("/n Error!");
  return;
 }
  setcolor(15);
  A.GetTop(0).GetXY(x0,y0);
  A.GetTop(3).GetXY(r,col);
  bar(x0,y0,r,col);
A.gohead();
while (A.isend())
 {
  A.GFC().GetCenter().GetXY(x0,y0);
  r=A.GFC().GetRadius();
  col=A.GFC().GetColor();
  setcolor(col);
  arc(x0,y0,0,360,r);
  A.gonext();
 }
  A.GFC().GetCenter().GetXY(x0,y0);
  r=A.GFC().GetRadius();
  col=A.GFC().GetColor();
  setcolor(col);
  arc(x0,y0,0,360,r);

getch();
closegraph();
A.list::print();
return;
}
Соседние файлы в папке Лабораторная работа 3