GG
DrawUtil.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /* GG is a GUI for SDL and OpenGL.
3  Copyright (C) 2003-2008 T. Zachary Laine
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public License
7  as published by the Free Software Foundation; either version 2.1
8  of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free
17  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18  02111-1307 USA
19 
20  If you do not wish to comply with the terms of the LGPL please
21  contact the author as other terms are available for a fee.
22 
23  Zach Laine
24  whatwasthataddress@gmail.com */
25 
29 #ifndef _GG_DrawUtil_h_
30 #define _GG_DrawUtil_h_
31 
32 #include <GG/Base.h>
33 
34 
35 namespace GG {
36 
38  GG_API void glColor(Clr clr);
39 
41  GG_API void glVertex(const Pt& pt);
42 
44  GG_API void glVertex(X x, Y y);
45 
47  GG_API void glVertex(X_d x, Y_d y);
48 
50  GG_API void glVertex(X x, Y_d y);
51 
53  GG_API void glVertex(X_d x, Y y);
54 
58  GG_API Clr LightColor(Clr clr);
59 
63  GG_API Clr DarkColor(Clr clr);
64 
70  GG_API Clr DisabledColor(Clr clr);
71 
78  GG_API void BeginScissorClipping(Pt ul, Pt lr);
79 
83  GG_API void EndScissorClipping();
84 
95  GG_API void BeginStencilClipping(Pt inner_ul, Pt inner_lr,
96  Pt outer_ul, Pt outer_lr);
97 
101  GG_API void EndStencilClipping();
102 
110  GG_API void FlatRectangle(Pt ul, Pt lr, Clr color, Clr border_color, unsigned int border_thick = 2);
111 
120  GG_API void BeveledRectangle(Pt ul, Pt lr, Clr color, Clr border_color, bool up, unsigned int bevel_thick = 2,
121  bool bevel_left = true, bool bevel_top = true, bool bevel_right = true, bool bevel_bottom = true);
122 
124  GG_API void FlatCheck(Pt ul, Pt lr, Clr color);
125 
127  GG_API void BeveledCheck(Pt ul, Pt lr, Clr color);
128 
130  GG_API void FlatX(Pt ul, Pt lr, Clr color);
131 
133  GG_API void BeveledX(Pt ul, Pt lr, Clr color);
134 
137  GG_API void Bubble(Pt ul, Pt lr, Clr color, bool up = true);
138 
140  GG_API void FlatCircle(Pt ul, Pt lr, Clr color, Clr border_color, unsigned thick = 2);
141 
145  GG_API void BeveledCircle(Pt ul, Pt lr, Clr color, Clr border_color, bool up = true, unsigned int bevel_thick = 2);
146 
152  GG_API void FlatRoundedRectangle(Pt ul, Pt lr, Clr color, Clr border_color, unsigned int corner_radius = 5, unsigned int border_thick = 2);
153 
156  GG_API void BeveledRoundedRectangle(Pt ul, Pt lr, Clr color, Clr border_color, bool up, unsigned int corner_radius = 5, unsigned int bevel_thick = 2);
157 
160  GG_API void BubbleRectangle(Pt ul, Pt lr, Clr color, bool up, unsigned int corner_radius = 5);
161 
162 }
163 
164 #endif