readimagefile("rect.bmp", 610, 218, 645, 238); button(608, 214, 647, 243, 7);
readimagefile("bar.bmp", 653, 218 ,688, 238); button(650, 214, 691, 243, 7);
readimagefile("ellipse.bmp", 610, 250, 645, 272);button(608, 245, 647, 277, 7);
readimagefile("ellipse2.bmp", 653, 250, 688, 272);button(650, 245, 691, 277, 7);
readimagefile("circ.bmp", 613, 282, 640, 307); button(608, 279, 647, 310, 7);
readimagefile("bar3d.bmp", 656, 280, 692, 307); button(650, 279, 691, 310, 7);
readimagefile("line.bmp", 610, 312, 643, 340); button(608, 312, 647, 340, 7);
readimagefile("brush.bmp", 637, 450, 682, 495); button(633, 448, 692, 497, 15);
active_collor(x,y);
setfillstyle(5,12);
bar(636,516,690,535);
}
void file_screen()
{
setfillstyle(1,10);
setcolor(8);
setlinestyle(0, 0, 2);
bar(600, 51, 698, 167);
rectangle(600, 51, 698, 167);
setbkcolor(10);
setcolor(15);
settextstyle(10, 0,1);
outtextxy(607, 58, "new");
outtextxy(607, 98, "open");
outtextxy(607, 138, "save");
readimagefile("new.bmp", 670, 55, 690, 78);
readimagefile("open.bmp", 664, 94, 692, 122);
readimagefile("save.bmp", 664, 135, 695, 162);
}
void palette()
{
int left, top, c, color;
left=55;
top=514;
color = getcolor();
setcolor(8);
setfillstyle(1,13);
bar(0,510,700,540);
rectangle(0,510,700,540);
setcolor(15);
setbkcolor(13);
outtextxy(4,515,"Colors:");
for( c = 0 ; c <= 15 ; c++ )
{
setfillstyle(1, c);
bar(left, top, left+20, top+20);
setcolor(15);
rectangle(left, top, left+20, top+20);
leftcolor[c-1] = left;
left+=30;
}
setcolor(color);
}
void button(int x1,int y1,int x2,int y2,int col)
{
setcolor(col);
setlinestyle(0, 1, 1);
rectangle(x1,y1,x2,y2);
}
void active_collor(int x,int y)
{
act_col=getpixel(x,y);
setfillstyle(1,act_col);
bar(635,515,690,535);
setcolor(15);
setlinestyle(0, 1,tsize);
rectangle(635,515,690,535);
}