box.c 726 B

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. \file lib/cairodriver/box.c
  3. \brief GRASS cairo display driver - draw box
  4. (C) 2007-2008 by Lars Ahlzen and the GRASS Development Team
  5. This program is free software under the GNU General Public License
  6. (>=v2). Read the file COPYING that comes with GRASS for details.
  7. \author Lars Ahlzen <lars ahlzen.com> (original contibutor)
  8. \author Glynn Clements
  9. */
  10. #include "cairodriver.h"
  11. /*!
  12. \brief Draw a (filled) rectangle
  13. \param x1,y1,x2,y2 rectangle coordinates
  14. */
  15. void Cairo_Box(double x1, double y1, double x2, double y2)
  16. {
  17. G_debug(3, "Cairo_Box %f %f %f %f\n", x1, y1, x2, y2);
  18. cairo_rectangle(cairo, x1, y1, x2 - x1, y2 - y1);
  19. cairo_fill(cairo);
  20. ca.modified = 1;
  21. return;
  22. }