IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 22, 2007, 12:23:09 PM (19 years ago)
Author:
eugene
Message:

upgrading to kapa 2.0 API, upgrades to dvo user interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/tvgrid.c

    r7917 r13479  
    1111  char format[16];
    1212  Coords coords;
    13   int Ximage, Nimage, N, Noverlay, NOVERLAY;
     13  int kapa, N, Noverlay, NOVERLAY;
     14  char *name;
    1415  Buffer *buf;
    1516  KiiOverlay *overlay;
    1617
    17   Nimage = -1;
     18  name = NULL;
    1819  if ((N = get_argument (argc, argv, "-n"))) {
    1920    remove_argument (N, &argc, argv);
    20     Nimage = atof (argv[N]);
     21    name = strcreate (argv[N]);
    2122    remove_argument (N, &argc, argv);
    2223  }
    23   if (!GetImage (&Ximage, &Nimage)) return (FALSE);
    24  
     24  if (!GetImage (NULL, &kapa, name)) return (FALSE);
     25  FREE (name);
     26
    2527  if (argc != 3) {
    2628    gprint (GP_ERR, "USAGE: tvgrid (overlay) (buffer)\n");
     
    144146  }
    145147
    146   # if (0)
    147   /* write the labels on the axes */
    148   dDEC = fabs(dec1 - dec0) / 100;
    149   for (ra = dRA * ((int)(MIN(ra0, ra1)/dRA) + 1); ra < MAX(ra0, ra1); ra += dRA) {
    150     RD_to_XY (&x0, &y0, ra + 0.1*dRA, MIN(dec0, dec1), &coords);
    151     sprintf (label, format, ra);
    152     sprintf (buffer, "%15s %20.10f %20.10f %20.10f %20.10f ", "TEXT", x0, y0, (double)(strlen(label) + 1), 0.0);
    153     write (Ximage, buffer, 128);
    154     write (Ximage, label, strlen(label) + 1);
    155     RD_to_XY (&x0, &y0, ra, MIN(dec0, dec1), &coords);
    156     for (dec = MIN(dec0, dec1) + dDEC; dec < MAX(dec0,dec1); dec += dDEC) {
    157       RD_to_XY (&x1, &y1, ra, dec, &coords);
    158       sprintf (buffer, "%15s %20.10f %20.10f %20.10f %20.10f ", "LINE", x0, y0, (x1 - x0), (y1 - y0));
    159       write (Ximage, buffer, 128);
    160       x0 = x1;
    161       y0 = y1;
    162     }
    163   }
    164   # endif
    165 
    166   KiiLoadOverlay (Ximage, overlay, Noverlay, argv[1]);
     148  KiiLoadOverlay (kapa, overlay, Noverlay, argv[1]);
    167149  free (overlay);
    168150
Note: See TracChangeset for help on using the changeset viewer.