Go to the documentation of this file.00001 #ifndef WIT_RENDERER_H
00002 #define WIT_RENDERER_H
00003
00004 #include "geometry.h"
00005 #ifdef WIT_USE_QT
00006 #include "wit.h"
00007 #else
00008 #include <ogc/gx.h>
00009 #endif
00010
00011 namespace wit {
00012
00013 class RendererPrivate;
00014 class Renderer {
00015 public:
00016 Renderer();
00017 virtual ~Renderer();
00018
00019 virtual void render() = 0;
00020 virtual void waitForRendering();
00021
00022 float scale() const;
00023 void setScale(float mag);
00024
00025 float translateX() const;
00026 float translateY() const;
00027 void setTranslation(float x, float y);
00028
00029 void drawPoint(const Point& p, const GXColor& color);
00030 void drawPoint(float x, float y, const GXColor& color);
00031
00032 void drawLine(const Point& p1, const Point& p2, const GXColor& color);
00033 void drawLine(float x1, float y1, float x2, float y2, const GXColor& color);
00034
00035 void drawRect(const Rect& rect, const GXColor& color);
00036 void fillRect(const Rect& rect, const GXColor& color);
00037
00038 void drawPoints(const Polygon& poly, const GXColor& color);
00039 void drawPolygon(const Polygon& poly, const GXColor& color);
00040 void fillPolygon(const Polygon& poly, const GXColor& color);
00041
00042 private:
00043 RendererPrivate* d;
00044 };
00045
00046 }
00047
00048 #endif