GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
cairodriver/box.c
Go to the documentation of this file.
1 /*!
2  \file lib/cairodriver/box.c
3 
4  \brief GRASS cairo display driver - draw box
5 
6  (C) 2007-2008 by Lars Ahlzen and the GRASS Development Team
7 
8  This program is free software under the GNU General Public License
9  (>=v2). Read the file COPYING that comes with GRASS for details.
10 
11  \author Lars Ahlzen <lars ahlzen.com> (original contibutor)
12  \author Glynn Clements
13 */
14 
15 #include "cairodriver.h"
16 
17 /*!
18  \brief Draw a (filled) rectangle
19 
20  \param x1,y1,x2,y2 rectangle coordinates
21 */
22 void Cairo_Box(double x1, double y1, double x2, double y2)
23 {
24  G_debug(3, "Cairo_Box %f %f %f %f\n", x1, y1, x2, y2);
25 
26  cairo_rectangle(cairo, x1, y1, x2 - x1, y2 - y1);
27  cairo_fill(cairo);
28  ca.modified = 1;
29 
30  return;
31 }
struct cairo_state ca
void Cairo_Box(double x1, double y1, double x2, double y2)
Draw a (filled) rectangle.
cairo_t * cairo
GRASS cairo display driver - header file.
int G_debug(int, const char *,...) __attribute__((format(printf