Rename GP_Context -> GP_Pixmap
[gfxprim.git] / include / gfx / GP_Rect.h
blob70eadf50c18632ceb09d27e138d3b01498fdc218
1 /*****************************************************************************
2 * This file is part of gfxprim library. *
3 * *
4 * Gfxprim is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU Lesser General Public *
6 * License as published by the Free Software Foundation; either *
7 * version 2.1 of the License, or (at your option) any later version. *
8 * *
9 * Gfxprim is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * Lesser General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with gfxprim; if not, write to the Free Software *
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17 * Boston, MA 02110-1301 USA *
18 * *
19 * Copyright (C) 2009-2011 Jiri "BlueBear" Dluhos *
20 * <jiri.bluebear.dluhos@gmail.com> *
21 * *
22 * Copyright (C) 2009-2011 Cyril Hrubis <metan@ucw.cz> *
23 * *
24 *****************************************************************************/
26 #ifndef GP_RECT_H
27 #define GP_RECT_H
29 #include "core/GP_Pixmap.h"
31 /* Rectangle */
33 void GP_RectXYXY(GP_Pixmap *pixmap, GP_Coord x0, GP_Coord y0,
34 GP_Coord x1, GP_Coord y1, GP_Pixel pixel);
36 void GP_RectXYXY_Raw(GP_Pixmap *pixmap, GP_Coord x0, GP_Coord y0,
37 GP_Coord x1, GP_Coord y1, GP_Pixel pixel);
39 void GP_RectXYWH(GP_Pixmap *pixmap, GP_Coord x, GP_Coord y,
40 GP_Size w, GP_Size h, GP_Pixel pixel);
42 void GP_RectXYWH_Raw(GP_Pixmap *pixmap, GP_Coord x, GP_Coord y,
43 GP_Size w, GP_Size h, GP_Pixel pixel);
45 /* The XYXY argument set is the default */
46 static inline void GP_Rect(GP_Pixmap *pixmap, GP_Coord x0, GP_Coord y0,
47 GP_Coord x1, GP_Coord y1, GP_Pixel pixel)
49 GP_RectXYXY(pixmap, x0, y0, x1, y1, pixel);
52 static inline void GP_Rect_Raw(GP_Pixmap *pixmap, GP_Coord x0, GP_Coord y0,
53 GP_Coord x1, GP_Coord y1, GP_Pixel pixel)
55 GP_RectXYXY_Raw(pixmap, x0, y0, x1, y1, pixel);
58 /* Filled Rectangle */
60 void GP_FillRectXYXY(GP_Pixmap *pixmap, GP_Coord x0, GP_Coord y0,
61 GP_Coord x1, GP_Coord y1, GP_Pixel pixel);
63 void GP_FillRectXYXY_Raw(GP_Pixmap *pixmap, GP_Coord x0, GP_Coord y0,
64 GP_Coord x1, GP_Coord y1, GP_Pixel pixel);
66 void GP_FillRectXYWH(GP_Pixmap *pixmap, GP_Coord x, GP_Coord y,
67 GP_Size w, GP_Size h, GP_Pixel pixel);
69 void GP_FillRectXYWH_Raw(GP_Pixmap *pixmap, GP_Coord x, GP_Coord y,
70 GP_Size w, GP_Size h, GP_Pixel pixel);
72 /* The XYXY argument set is the default */
73 static inline void GP_FillRect(GP_Pixmap *pixmap, GP_Coord x0, GP_Coord y0,
74 GP_Coord x1, GP_Coord y1, GP_Pixel pixel)
76 GP_FillRectXYXY(pixmap, x0, y0, x1, y1, pixel);
79 static inline void GP_FillRect_Raw(GP_Pixmap *pixmap,
80 GP_Coord x0, GP_Coord y0,
81 GP_Coord x1, GP_Coord y1, GP_Pixel pixel)
83 GP_FillRectXYXY_Raw(pixmap, x0, y0, x1, y1, pixel);
86 #endif /* GP_RECT_H */