class DrawingContext
{
public:
- DrawingContext();
+ DrawingContext(Renderer& renderer, Lightmap& lightmap);
~DrawingContext();
- void init_renderer();
-
/// Adds a drawing request for a surface into the request list.
void draw_surface(SurfacePtr surface, const Vector& position,
int layer);
void draw_inverse_ellipse(const Vector& pos, const Vector& size, const Color& color, int layer);
+ /// Returns the visible area in world coordinates
+ Rectf get_cliprect() const;
+
/// Processes all pending drawing requests and flushes the list.
void do_drawing();
};
private:
- Renderer *renderer;
- Lightmap *lightmap;
+ Renderer& renderer;
+ Lightmap& lightmap;
/// the transform stack
std::vector<Transform> transformstack;