fancy.c 800 B

123456789101112131415161718192021222324
  1. #include <grass/gis.h>
  2. #include <grass/raster.h>
  3. #include "options.h"
  4. void fancy(struct Cell_head *window, struct Categories *cats, FILE * fp)
  5. {
  6. char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
  7. G_unqualified_name(map_name, G_mapset(), xname, xmapset);
  8. fprintf(fp, ".C %s\n", "green");
  9. fprintf(fp, ".S %f\n", size + 1.0);
  10. fprintf(fp, "LOCATION: %s\n", G_location());
  11. fprintf(fp, ".C %s\n", color);
  12. fprintf(fp, ".S %f\n", size);
  13. fprintf(fp, "%s in %s\n", xname, xmapset);
  14. fprintf(fp, "%s\n", cats->title);
  15. fprintf(fp, "North: %10.2f South: %10.2f\n",
  16. window->north, window->south);
  17. fprintf(fp, "West: %10.2f East: %10.2f\n", window->west, window->east);
  18. fprintf(fp, "Resolution: n-s: %7.2f e-w: %7.2f\n",
  19. window->ns_res, window->ns_res);
  20. }