#include "video/font_ptr.hpp"
#include "video/texture.hpp"
-class DrawingRequest;
-class Lightmap;
-class Renderer;
+struct DrawingRequest;
class Surface;
class Texture;
+class VideoSystem;
// some constants for predefined layer values
enum {
class DrawingContext
{
public:
- DrawingContext(Renderer& renderer, Lightmap& lightmap);
+ DrawingContext(VideoSystem& video_system);
~DrawingContext();
/// Adds a drawing request for a surface into the request list.
float angle, const Color& color, const Blend& blend,
int layer);
/// Adds a drawing request for part of a surface.
- void draw_surface_part(SurfacePtr surface, const Vector& source,
- const Vector& size, const Vector& dest, int layer);
+ void draw_surface_part(SurfacePtr surface,
+ const Rectf& srcrect, const Rectf& dstrect,
+ int layer);
/// Draws a text.
void draw_text(FontPtr font, const std::string& text,
const Vector& position, FontAlignment alignment, int layer, Color color = Color(1.0,1.0,1.0));
void clear_drawing_requests(DrawingRequests& requests);
private:
- Renderer& renderer;
- Lightmap& lightmap;
+ VideoSystem& video_system;
/// the transform stack
std::vector<Transform> transformstack;