Разработка программы, демонстрирующей выполнение функций рисования геометрических фигур (Лабораторная работа по № 1), страница 7

                                       printf("\nparametry dly vneshnei trapecii : ");

                                       printf ("Line_Light=%d Line_Tip=%d " ,Line_Light,Line_Tip);

                                       printf("\nparametry dly vnutrennei trapecii : ");

                                       printf ("Line_Light1=%d Line_Tip1=%d\n" ,Line_Light1,Line_Tip1);

                                     }

void Get_Graphics_Par_LiNe_v_File(  ) //linii v fila

                                     {

                                       FILE * fp ;

                                       fp = fopen ("OParLin.txt","w");

                                       //dlya vneshnei trapecii

                                       fprintf (fp,"%d %d\n" ,Line_Light,Line_Tip) ;

                                       //dlya vnutrennei trapecii

                                       fprintf (fp,"%d %d" , Line_Light1,Line_Tip1 ) ;

                                       fclose(fp);

                                     }

void paint_F_ ( int a )//рисование контура если а = 1, то нарисуем внешнюю трапецию

                                   //если а = 2 - внутреннюю

                           {

                             clrscr();

                             int gd , gm , error ;

                             detectgraph( &gd , &gm ) ;

                             initgraph ( &gd , &gm , "" ) ;

                             error = graphresult() ;

                             if ( error != grOk )

                                     {

                                      puts ("ERROR :\n ") ;

                                      puts ( grapherrormsg ( error ) ) ;

                                      exit (1) ;

                                     }

                             else

                                     {

                             if (a==1)

                                       {

                                         setcolor(Line_Light);

                                         setlinestyle(Line_Tip,0,1);

                                         line(MAS[0],MAS[1],MAS[2],MAS[3]) ;

                                         line(MAS[2],MAS[3],MAS[4],MAS[5]) ;

                                         line(MAS[4],MAS[5],MAS[6],MAS[7]) ;

                                         line(MAS[6],MAS[7],MAS[0],MAS[1]) ;

                                         printf("VNESH TRAPECIYA") ;

                                       }

                             if (a==2)

                                       {

                                         setcolor(Line_Light1);

                                         setlinestyle(Line_Tip1,0,1);

                                         line(MAS1[0],MAS1[1],MAS1[2],MAS1[3]) ;

                                         line(MAS1[2],MAS1[3],MAS1[4],MAS1[5]) ;

                                         line(MAS1[4],MAS1[5],MAS1[6],MAS1[7]) ;

                                         line(MAS1[6],MAS1[7],MAS1[0],MAS1[1]) ;

                                         printf("VNUT TRAPECIYA") ;

                                       }

                             }

                            getch();

                            closegraph();

                           }

     void paint_F_Z ( int a ) )//рисование закрашенной трапеции если а = 1, то нарисуем

                                            //внешнюю трапецию , если а = 2 - внутреннюю

                 {

                   clrscr();

                   int gd , gm , error ;