home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / tools / bgi_tool / debdemo.c < prev    next >
Text File  |  1989-05-30  |  961b  |  60 lines

  1.  
  2. /*
  3.  
  4.   DEBDEMO - demo program for BGI debug driver
  5.  
  6.   Copyright (c) 1988,89 - Borland International
  7.  
  8. */
  9.  
  10.  
  11.  
  12. #include <stdio.h>
  13. #include <graphics.h>
  14. #include <stdlib.h>
  15.  
  16. int huge Always_One( void )
  17. {
  18.   return( 1 );
  19. }
  20.  
  21. void main( )
  22. {
  23.  
  24.   int drv = DETECT, mode = 0, result;
  25.  
  26.   printf( "BGI Debug Driver Demo  Copyright (c) 1987,1989 Borland International Inc.\n\n");
  27.  
  28.   installuserdriver( "DEBUG", Always_One );
  29.  
  30.   initgraph( &drv, &mode, "" );
  31.   result = graphresult();
  32.   printf( "Graphresult = %d\n", result );
  33.   if( result ) exit( result );
  34.  
  35.   setcolor( 1 );
  36.   bar( 100, 100, 200, 200 );
  37.  
  38.   setcolor( 2 );
  39.   bar( 100, 100, 200, 200 );
  40.  
  41.   setcolor( 3 );
  42.   line( 300, 300, 400, 400 );
  43.  
  44.   setcolor( 4 );
  45.   circle( 10, 10, 30 );
  46.  
  47.   setcolor( 5 );
  48.   moveto( 10, 10 );
  49.   outtext( "OutText Call 1" );
  50.  
  51.   setcolor( 6 );
  52.   outtextxy( 20, 20, "OutText Call 2" );
  53.  
  54.   closegraph();
  55.  
  56.   printf( "Finished\n" );
  57.  
  58. }
  59.  
  60.