set_window.c 728 B

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. \file lib/cairodriver/set_window.c
  3. \brief GRASS cairo display driver - set window
  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 Set window
  13. \param t,b,l,r top, bottom, left, right
  14. */
  15. void Cairo_Set_window(double t, double b, double l, double r)
  16. {
  17. G_debug(1, "Cairo_Set_window: %f %f %f %f", t, b, l, r);
  18. cairo_reset_clip(cairo);
  19. cairo_rectangle(cairo, l, t, r - l, b - t);
  20. cairo_clip(cairo);
  21. return;
  22. }