raster.c 837 B

12345678910111213141516171819202122232425262728293031323334
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <grass/gis.h>
  4. #include "driver.h"
  5. #include "driverlib.h"
  6. /******************************************************************************
  7. * These routines support the drawing of multi-band images on the graphics
  8. * device.
  9. ******************************************************************************
  10. */
  11. void COM_begin_raster(int mask, int src[2][2], double dst[2][2])
  12. {
  13. if (driver->Begin_raster)
  14. (*driver->Begin_raster) (mask, src, dst);
  15. }
  16. int COM_raster(int n, int row,
  17. const unsigned char *red, const unsigned char *grn,
  18. const unsigned char *blu, const unsigned char *nul)
  19. {
  20. if (driver->Raster)
  21. return (*driver->Raster) (n, row, red, grn, blu, nul);
  22. return -1;
  23. }
  24. void COM_end_raster(void)
  25. {
  26. if (driver->End_raster)
  27. (*driver->End_raster) ();
  28. }