- enum RequestType
- {
- SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, LIGHTMAPREQUEST, GETLIGHT
- };
-
- struct SurfacePartRequest
- {
- const Surface* surface;
- Vector source, size;
- };
-
- struct TextRequest
- {
- const Font* font;
- std::string text;
- FontAlignment alignment;
- };
-
- struct GradientRequest
- {
- Color top, bottom;
- Vector size;
- };
-
- struct FillRectRequest
- {
- Color color;
- Vector size;
- };
-
- struct DrawingRequest
- {
- RequestType type;
- Vector pos;
-
- int layer;
- DrawingEffect drawing_effect;
- float alpha;
- Blend blend;
- float angle;
- Color color;
-
- void* request_data;
-
- DrawingRequest()
- : angle(0.0f),
- color(1.0f, 1.0f, 1.0f, 1.0f)
- {}
-
- bool operator<(const DrawingRequest& other) const
- {
- return layer < other.layer;
- }
- };
-
- struct GetLightRequest
- {
- Color* color_ptr;
- };
-
- typedef std::vector<DrawingRequest> DrawingRequests;