GG

DrawUtil.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /* GG is a GUI for SDL and OpenGL.
00003    Copyright (C) 2003-2008 T. Zachary Laine
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public License
00007    as published by the Free Software Foundation; either version 2.1
00008    of the License, or (at your option) any later version.
00009    
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014     
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with this library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA
00019 
00020    If you do not wish to comply with the terms of the LGPL please
00021    contact the author as other terms are available for a fee.
00022     
00023    Zach Laine
00024    whatwasthataddress@gmail.com */
00025 
00029 #ifndef _GG_DrawUtil_h_
00030 #define _GG_DrawUtil_h_
00031 
00032 #include <GG/Base.h>
00033 
00034 
00035 namespace GG {
00036 
00038     GG_API void glColor(Clr clr);
00039 
00041     GG_API void glVertex(const Pt& pt);
00042 
00044     GG_API void glVertex(X x, Y y);
00045 
00047     GG_API void glVertex(X_d x, Y_d y);
00048 
00050     GG_API void glVertex(X x, Y_d y);
00051 
00053     GG_API void glVertex(X_d x, Y y);
00054 
00058     GG_API Clr LightColor(Clr clr);
00059 
00063     GG_API Clr DarkColor(Clr clr);
00064 
00070     GG_API Clr DisabledColor(Clr clr);
00071 
00078     GG_API void BeginScissorClipping(Pt ul, Pt lr);
00079 
00083     GG_API void EndScissorClipping();
00084 
00095     GG_API void BeginStencilClipping(Pt inner_ul, Pt inner_lr,
00096                                      Pt outer_ul, Pt outer_lr);
00097 
00101     GG_API void EndStencilClipping();
00102 
00110     GG_API void FlatRectangle(Pt ul, Pt lr, Clr color, Clr border_color, unsigned int border_thick = 2);
00111 
00120     GG_API void BeveledRectangle(Pt ul, Pt lr, Clr color, Clr border_color, bool up, unsigned int bevel_thick = 2,
00121                                  bool bevel_left = true, bool bevel_top = true, bool bevel_right = true, bool bevel_bottom = true);
00122 
00124     GG_API void FlatCheck(Pt ul, Pt lr, Clr color);
00125 
00127     GG_API void BeveledCheck(Pt ul, Pt lr, Clr color);
00128 
00130     GG_API void FlatX(Pt ul, Pt lr, Clr color);
00131 
00133     GG_API void BeveledX(Pt ul, Pt lr, Clr color);
00134 
00137     GG_API void Bubble(Pt ul, Pt lr, Clr color, bool up = true);
00138 
00140     GG_API void FlatCircle(Pt ul, Pt lr, Clr color, Clr border_color, unsigned thick = 2);
00141 
00145     GG_API void BeveledCircle(Pt ul, Pt lr, Clr color, Clr border_color, bool up = true, unsigned int bevel_thick = 2);
00146 
00152     GG_API void FlatRoundedRectangle(Pt ul, Pt lr, Clr color, Clr border_color, unsigned int corner_radius = 5, unsigned int border_thick = 2);
00153 
00156     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);
00157 
00160     GG_API void BubbleRectangle(Pt ul, Pt lr, Clr color, bool up, unsigned int corner_radius = 5);
00161 
00162 }
00163 
00164 #endif // _GG_DrawUtil_h_