xoreos  0.0.5
borderquad.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
26 #ifndef GRAPHICS_AURORA_BORDERQUAD_H
27 #define GRAPHICS_AURORA_BORDERQUAD_H
28 
30 
33 
34 namespace Graphics {
35 
36 namespace Aurora {
37 
38 class BorderQuad : public Renderable {
39 public:
40  BorderQuad(const Common::UString &edge, const Common::UString &corner, float x, float y, float w, float h,
41  int dimension = 0);
42 
44  void setColor(float r, float g, float b, float a = 1.0f);
45 
46  void setPosition(float x, float y, float z);
47  void getPosition(float &x, float &y, float &z);
48  void setSize(float w, float h);
49  void getSize(float &w, float &h) const;
50 
51  virtual void calculateDistance();
52 
53  void render(RenderPass pass);
54 
55 private:
57 
59 
62 
63  float _r;
64  float _g;
65  float _b;
66  float _a;
67 
68  float _x;
69  float _y;
70  float _w;
71  float _h;
72 };
73 
74 } // End of namespace Aurora
75 
76 } // End of namespace Engines
77 
78 #endif // GRAPHICS_AURORA_BORDERQUAD_H
A class holding an UTF-8 string.
Definition: ustring.h:48
BorderQuad(const Common::UString &edge, const Common::UString &corner, float x, float y, float w, float h, int dimension=0)
Definition: borderquad.cpp:35
A handle to an Aurora texture.
virtual void calculateDistance()
Calculate the object&#39;s distance.
Definition: borderquad.cpp:112
RenderPass
Definition: types.h:97
void setPosition(float x, float y, float z)
Definition: borderquad.cpp:79
void render(RenderPass pass)
Render the object.
Definition: borderquad.cpp:115
An object that can be displayed by the graphics manager.
Definition: renderable.h:42
void setColor(float r, float g, float b, float a=1.0f)
Set the color of the border quad.
Definition: borderquad.cpp:72
A texture as used in the Aurora engines.
void getPosition(float &x, float &y, float &z)
Definition: borderquad.cpp:90
#define pass
Definition: fft.cpp:257
A handle to a texture.
Definition: texturehandle.h:51
An object that can be displayed by the graphics manager.
void getSize(float &w, float &h) const
Definition: borderquad.cpp:107
void setSize(float w, float h)
Definition: borderquad.cpp:96