FIFE  2008.0
opengl_gui_graphics.h
1 /***************************************************************************
2  * Copyright (C) 2005-2011 by the FIFE team *
3  * http://www.fifengine.net *
4  * This file is part of FIFE. *
5  * *
6  * FIFE is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Lesser General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2.1 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
20  ***************************************************************************/
21 
22 #ifndef FIFE_GUI_OPENGL_GRAPHICS_H
23 #define FIFE_GUI_OPENGL_GRAPHICS_H
24 
25 // Standard C++ library includes
26 
27 // 3rd party library includes
28 #include <guichan/opengl/openglgraphics.hpp>
29 
30 // FIFE includes
31 // These includes are split up in two parts, separated by one empty line
32 // First block: files included from the FIFE root src dir
33 
34 namespace FIFE {
35  class RenderBackendOpenGL;
36 
39  class OpenGLGuiGraphics: public gcn::OpenGLGraphics {
40  public:
44  virtual void drawImage(const gcn::Image* image, int32_t srcX, int32_t srcY, int32_t dstX, int32_t dstY, int32_t width, int32_t height);
45 
46  virtual void drawText(const std::string& text, int32_t x, int32_t y, uint32_t alignment);
47  virtual void drawPoint(int32_t x, int32_t y);
48  virtual void drawLine(int32_t x1, int32_t y1, int32_t x2, int32_t y2);
49  virtual void drawRectangle(const gcn::Rectangle& rectangle);
50  virtual void fillRectangle(const gcn::Rectangle& rectangle);
51 
52  virtual void _beginDraw();
53  virtual void _endDraw();
54 
55  virtual bool pushClipArea(gcn::Rectangle area);
56  virtual void popClipArea();
57 
58  virtual void setColor(const gcn::Color& color);
59 
60  private:
61  RenderBackendOpenGL* m_renderbackend;
62  };
63 }
64 
65 #endif
credit to phoku for his NodeDisplay example which the visitor code is adapted from ( he coded the qua...
Definition: soundclip.cpp:39