home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / plotting / imagetoo / imagetl1.lha / Imagetool / headers / struct.h < prev   
Encoding:
C/C++ Source or Header  |  1990-09-20  |  3.0 KB  |  105 lines

  1. /*
  2. ******************************************************************************
  3. *                               NCSA ImageTool 1.1 beta
  4. *                           Thu Sep 20 16:58:25 CDT 1990
  5. * NCSA ImageTool 1.1 beta source code and documentation are in the public
  6. * domain.
  7. * Specifically, we give to the public domain all rights for future licensing
  8. * of the source code, all resale rights, and all publishing rights.
  9. * We ask, but do not require, that the following message be included in all
  10. * derived works:
  11. * Portions developed at the National Center for Supercomputing Applications at
  12. * the University of Illinois at Urbana-Champaign.
  13. * THE UNIVERSITY OF ILLINOIS GIVES NO WARRANTY, EXPRESSED OR IMPLIED, FOR THE
  14. * SOFTWARE AND/OR DOCUMENTATION PROVIDED, INCLUDING, WITHOUT LIMITATION,
  15. * WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE
  16. ******************************************************************************
  17. */
  18. /* cat > headers/struct.h << "EOF" */
  19. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  20. /* struct.h: structure declarations for CompositeTool    */
  21. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  22. /* SCCS information: %W%    %G% */
  23.  
  24.     typedef int Flag;
  25.  
  26.         /* record type for current image */
  27.     struct image_rec
  28.     {
  29.             /* image information */
  30.         char img_name[MAXNAMELEN];    /* image file name */ 
  31.         char pal_name[MAXNAMELEN];    /* palette name */ 
  32.  
  33.             /* 1.1 additions - begin */
  34.         enum img_type itype;        /* type - 0 always means raw */
  35.         int img_num;            /* number of image_type if in HDF file - 0 means raw image */
  36.         enum pal_type ptype;        /* type - 0 always means raw */
  37.         int pal_num;            /* number of palette if in HDF file - 0 means raw palette */
  38.             /* 1.1 additions - end */
  39.  
  40.         int startx, starty;        /* upper left corner of current image */
  41.         int org_xdim, org_ydim;        /* original image sizes (x and y) */
  42.         int xdim, ydim;            /* current sizes after expansion */
  43.         int nth_image;            /* order in a sequence (animation) */
  44.         struct pixrect *image;        /* pointer to image memory */ 
  45.  
  46.             /* 1.1 additions - begin */
  47.         unsigned char *red, *green, *blue;    /* pointers to RGB color maps */ 
  48.             /* 1.1 additions - end */
  49.  
  50.             /* expansion information */
  51.         Flag expanded;            /* indication of image expansion */
  52.         int zoomx, zoomy;        /* expansion factor in x and y dir */
  53.     
  54.             /* scaling info */
  55.         float xmin, xmax, ymin, ymax;    /* scales in x, y dir */ 
  56.         float gmin, gmax;
  57.         float xscale, yscale;
  58.     
  59.             /* other flags */
  60.         Flag in_use;            /* 0: record unused; 1: record in use */
  61.         Flag cutout;            /* is cutout image */
  62.     };
  63.     
  64.     struct square_rec
  65.     {
  66.         int startx, starty;
  67.         int endx, endy;
  68.     };
  69.     
  70.     struct line_rec
  71.     {
  72.         int x1, y1;
  73.         int x2, y2;
  74.     };
  75.     
  76.     struct clipbd_type
  77.     {
  78.         struct pixrect *pr;
  79.         int xdim, ydim;
  80.     };
  81.     
  82.         /* dummy for file name expansion list */
  83.     struct argnod
  84.     {
  85.         struct argnod    *argnxt;
  86.         char   argval[1];
  87.     };
  88.  
  89. /* ~~~~~~~~~~~~~~~~~~~~ 1.1 additions ~~~~~~~~~~~~~~~~~~~~ */
  90.  
  91.     typedef int (*PFUNC) ();
  92.  
  93.     struct pal
  94.     {
  95.         char fn[MAXNAMELEN];    /* filename */
  96.         enum pal_type type;    /* file type of palette */
  97.         int num;        /* number of palette */
  98.     };
  99. /* EOF */
  100.