window.c 595 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * D_erase()
  3. * Erases the window on scree. Does not affect window contents list.
  4. */
  5. #include <string.h>
  6. #include <grass/colors.h>
  7. #include <grass/gis.h>
  8. #include <grass/display.h>
  9. #include "driver.h"
  10. void D_erase(const char *color)
  11. {
  12. double t, b, l, r;
  13. int colorindex;
  14. D_get_dst(&t, &b, &l, &r);
  15. /* Parse and select background color */
  16. colorindex = D_parse_color(color, 0);
  17. D_use_color(colorindex);
  18. /* Do the plotting */
  19. COM_Begin();
  20. COM_Move(l, b);
  21. COM_Cont(r, b);
  22. COM_Cont(r, t);
  23. COM_Cont(l, t);
  24. COM_Close();
  25. COM_Fill();
  26. }