#include <ugl_graphics.hpp>
Inheritance diagram for ufo::UGL_Graphics:
Public Member Functions | |
UGL_Graphics (UContext *context) | |
virtual UContext * | getContext () const |
virtual void | resetDeviceAttributes () |
virtual void | resetDeviceViewMatrix () |
virtual URectangle | mapToDevice (const URectangle &rect) |
virtual URectangle | mapFromDevice (const URectangle &rect) |
virtual void | begin () |
virtual void | end () |
virtual void | flush () |
virtual void | clear () |
virtual UImageIO * | dump () |
virtual void | setColor (const UColor &color) |
virtual UColor | getColor () const |
virtual void | setClearColor (const UColor &clearColor) |
virtual UColor | getClearColor () const |
virtual void | setFont (const UFont &font) |
virtual UFont | getFont () const |
virtual void | setEnabled (GCState state, bool b) |
virtual bool | isEnabled (GCState state) const |
virtual void | drawString (const std::string &text, int x=0, int y=0) |
virtual UDimension | getStringSize (const std::string &string) |
virtual void | setClipRect (const URectangle &rect) |
virtual URectangle | getClipRect () const |
virtual void | setLineWidth (float width) |
virtual float | getLineWidth () const |
virtual void | translate (float x, float y) |
virtual float | getTranslationX () const |
virtual float | getTranslationY () const |
virtual void | drawRect (const URectangle &rect) |
virtual void | fillRect (const URectangle &rect) |
virtual void | drawLine (const UPoint &p1, const UPoint &p2) |
virtual void | drawVertexArray (VertexType type, UVertexArray *buffer) |
virtual void | drawImage (UImage *image, const URectangle &rect) |
virtual void | drawSubImage (UImage *image, const URectangle &srcRect, const URectangle &destRect) |
This class is not part of the official UFO API and may be changed without warning.
|
Begins drawing operations. This sets all desired states and view transformation for painting UFO widgets. Drawing may be cached and delayed until the end call (or even later). Implements ufo::UGraphics.
|
|
Clears the screen with the clear color. Implements ufo::UGraphics.
|
|
Draws the given image at the specified position, eventually scaled on the fly when width and height differ from the image size.
Implements ufo::UGraphics.
|
|
Draws a line with the given coordinates and the current color. Implements ufo::UGraphics.
|
|
draws the outline of the given rectangle with the current writing color. Implements ufo::UGraphics.
|
|
Draws the given character string at the specified position using the current font. Implements ufo::UGraphics.
|
|
Draws the given image at the specified position, eventually scaled on the fly when width and height differ from the sub image size. If destRect.w and destRect.h are 0, the image is drawn without scaling
Implements ufo::UGraphics.
|
|
Draws the given vertex array with the given drawing method. Note that for triangles, only convex polygons are allowed. Order should always be clockwise! Implements ufo::UGraphics.
|
|
Dumps the screen contence to the new image io object. May be very slow when using hardware accelereated rendering. Implements ufo::UGraphics.
|
|
Ends drawing operations and reverts all changed states to the old state. Flushes all drawing operations. Implements ufo::UGraphics.
|
|
fills the given rectangle with the current writing color. Implements ufo::UGraphics.
|
|
Reimplemented from ufo::UGraphics.
|
|
Returns the clip rect in root coordinates. Implements ufo::UGraphics.
|
|
Returns the color which was previously set by setColor. May differ from the color of the underlying graphics context, when the color was directly set (without this graphics object).
Implements ufo::UGraphics.
|
|
Returns the context which is used for the drawing operations. Implements ufo::UGraphics.
|
|
Returns the font for this graphics object. Implements ufo::UGraphics.
|
|
Returns the bounding rect for the given character string using the current font. Implements ufo::UGraphics.
|
|
Maps the rectangle rect from the underlying graphics device, i.e. the OpenGL context to root coordinates! (which means to coordinates of the root pane) Implements ufo::UGraphics.
|
|
Maps the rectangle rect, which is in the coordinate space of this graphics object, to the underlying graphics device, i.e. the OpenGL context. Implements ufo::UGraphics.
|
|
Explicitly resets attributes. Is also called by
Reimplemented from ufo::UGraphics.
|
|
Explicitly resets the view matrix. Is also called by
Reimplemented from ufo::UGraphics.
|
|
Sets the clip rect in root coordinates. If rect is empty, clipping is disabled. Implements ufo::UGraphics.
|
|
Sets the color for this graphics object. Changes internally the color for the underlying graphics context.
Implements ufo::UGraphics.
|
|
Sets the font for this graphics object. Implements ufo::UGraphics.
|
|
Translates the coordinate system by the given x and y values. Implements ufo::UGraphics.
|