home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / LATTIC_3.LZH / EXAMPLES / LAF.C < prev    next >
C/C++ Source or Header  |  1990-05-14  |  1KB  |  61 lines

  1. /*
  2.  * Demonstrate the Line-A seed fill routine, using right mouse button
  3.  * to abort
  4.  *
  5.  * lc -Lg -v laf.c
  6.  *
  7.  * Copyright (c) 1990 HiSoft
  8.  */
  9.  
  10. #include <linea.h>
  11. #include <vdi.h>
  12. #include <aes.h>
  13.  
  14. short __saveds sab(void)
  15. {
  16.     return V_MOUSE_BT;        /* stop when a button pressed */
  17. }
  18.  
  19. main()
  20. {
  21.     short v_handle,junk;
  22.     short pattern[]=
  23.     {
  24.         0x0940,        /* %0000 1001 0100 0000 */
  25.         0x0f40,        /* %0000 1111 0100 0000 */
  26.         0x0940,        /* %0000 1001 0100 0000 */
  27.         0x64dc,        /* %0110 0100 1101 1100 */
  28.         0x8a88,        /* %1000 1010 1000 1000 */
  29.         0xcac8,        /* %1100 1010 1100 1000 */
  30.         0x2a88,        /* %0010 1010 1000 1000 */
  31.         0xa488,        /* %1100 0100 1000 1000 */
  32.     };
  33.  
  34.     appl_init();
  35.     v_handle=graf_handle(&junk,&junk,&junk,&junk);
  36.     linea0();
  37.     hidemouse();
  38.     vs_clip(v_handle,0,NULL);
  39.     vswr_mode(v_handle,MD_REPLACE);
  40.     vsf_color(v_handle,BLACK);
  41.     vsf_interior(v_handle,FIS_HOLLOW);
  42.     vsf_perimeter(v_handle,1);
  43.     v_circle(v_handle,V_X_MAX/2,V_Y_MAX/2,V_Y_MAX/2);
  44.     vsf_color(v_handle,BLACK);
  45.     PTSIN[0]=V_X_MAX/2;
  46.     PTSIN[1]=V_Y_MAX/2;
  47.     INTIN[0]=-1;
  48.     XMINCL=0;
  49.     YMINCL=0;
  50.     XMAXCL=V_X_MAX;
  51.     YMAXCL=V_Y_MAX;    
  52.     SEEDABORT=sab;
  53.     WMODE=MD_REPLACE;
  54.     PATPTR=pattern;
  55.     PATMSK=sizeof(pattern)/sizeof(short)-1;
  56.     MFILL=0;
  57.     lineaf();
  58.     showmouse(1);
  59.     appl_exit();
  60. }
  61.