#include <openglgraphics.hpp>
Inheritance diagram for gcn::OpenGLGraphics:
Definition at line 66 of file openglgraphics.hpp.
Public Member Functions | |
OpenGLGraphics () | |
Constructor. | |
OpenGLGraphics (int width, int height) | |
Constructor. | |
virtual | ~OpenGLGraphics () |
Destructor. | |
virtual void | setTargetPlane (int width, int height) |
Sets the target plane on where to draw. | |
virtual void | _beginDraw () |
Initializes drawing. | |
virtual void | _endDraw () |
Deinitializes drawing. | |
virtual bool | pushClipArea (Rectangle area) |
Pushes a clip area onto the stack. | |
virtual void | popClipArea () |
Removes the topmost clip area from the stack. | |
virtual void | drawImage (const Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height) |
Draws a part of an Image. | |
virtual void | drawPoint (int x, int y) |
Draws a single point/pixel. | |
virtual void | drawLine (int x1, int y1, int x2, int y2) |
Ddraws a line. | |
virtual void | drawRectangle (const Rectangle &rectangle) |
Draws a simple, non-filled, Rectangle with one pixel width. | |
virtual void | fillRectangle (const Rectangle &rectangle) |
Draws a filled Rectangle. | |
virtual void | setColor (const Color &color) |
Sets the Color to use when drawing. | |
virtual const Color & | getColor () |
Gets the Color to use when drawing. | |
Protected Attributes | |
int | mWidth |
int | mHeight |
bool | mAlpha |
Color | mColor |
|
Constructor.
Definition at line 85 of file openglgraphics.cpp. References setTargetPlane(). |
|
Destructor.
Definition at line 90 of file openglgraphics.cpp. |
|
Initializes drawing. Called by the Gui when Gui::draw() is called. It is needed by some implementations of Graphics to perform preparations before drawing. An example of such an implementation would be OpenGLGraphics. NOTE: You will never need to call this function yourself. Gui will do it for you.
Reimplemented from gcn::Graphics. Definition at line 95 of file openglgraphics.cpp. References pushClipArea(). |
|
Deinitializes drawing. Called by the Gui when a Gui::draw() is done. done. It should reset any state changes made by _beginDraw(). NOTE: You will never need to call this function yourself. Gui will do it for you.
Reimplemented from gcn::Graphics. Definition at line 145 of file openglgraphics.cpp. References popClipArea(). |
|
Draws a part of an Image. NOTE: Width and height arguments will not scale the Image but specifies the size of the part to be drawn. If you want to draw the whole Image there is a simplified version of this function. EXAMPLE: drawImage(myImage, 10, 10, 20, 20, 40, 40);
Implements gcn::Graphics. Definition at line 194 of file openglgraphics.cpp. |
|
Ddraws a line.
Implements gcn::Graphics. Definition at line 266 of file openglgraphics.cpp. |
|
Draws a single point/pixel.
Implements gcn::Graphics. Definition at line 256 of file openglgraphics.cpp. |
|
Draws a simple, non-filled, Rectangle with one pixel width.
Implements gcn::Graphics. Definition at line 283 of file openglgraphics.cpp. |
|
Draws a filled Rectangle.
Implements gcn::Graphics. Definition at line 297 of file openglgraphics.cpp. |
|
Gets the Color to use when drawing.
Implements gcn::Graphics. Definition at line 327 of file openglgraphics.cpp. |
|
Removes the topmost clip area from the stack.
Reimplemented from gcn::Graphics. Definition at line 173 of file openglgraphics.cpp. Referenced by _endDraw(). |
|
Pushes a clip area onto the stack. The x and y coordinates in the Rectangle will be relative to the last pushed clip area. If the new area falls outside the current clip area, it will be clipped as necessary.
Reimplemented from gcn::Graphics. Definition at line 161 of file openglgraphics.cpp. Referenced by _beginDraw(). |
|
Sets the Color to use when drawing.
Implements gcn::Graphics. Definition at line 311 of file openglgraphics.cpp. References gcn::Color::a. |
|
Sets the target plane on where to draw.
Definition at line 188 of file openglgraphics.cpp. Referenced by OpenGLGraphics(). |