9
typedef unsigned int Uint32;
16
Rect(int xx, int yy, int ww, int hh);
22
V2(double x, double y);
23
double operator[] (int idx);
26
typedef Uint32 PackedColor;
29
GS (const Rect &clipr);
38
virtual ~Drawable() {}
40
virtual PackedColor map_color(int r, int g, int b) = 0;
41
virtual PackedColor map_color(int r, int g, int b, int a) = 0;
43
virtual void blit (const GS &gs, int x, int y, Surface* s) = 0;
44
virtual void blit (const GS &gs, int x, int y, Surface* s, const Rect& r) = 0;
46
virtual Uint32 get_pixel (int x, int y) = 0;
48
//! Set a single pixel
49
virtual void set_pixel (const GS &gs, int x, int y) = 0;
51
//! Set multiple pixels at once
52
virtual void set_pixels (const GS &gs, int n, const int *x, const int *y);
54
//! Draw a horizontal line
55
virtual void hline (const GS &gs, int x, int y, int w);
57
//! Draw a vertical line
58
virtual void vline (const GS &gs, int x, int y, int h);
60
//! Draw an arbitrary line
61
virtual void line (const GS &gs, int x1, int y1, int x2, int y2);
63
//! Draw a filled box.
64
virtual void box (const GS &gs, int x, int y, int w, int h);
66
//! Return size of drawable: Rect (0,0,width, height)
67
virtual Rect size() const = 0;
71
class Surface : public Drawable {
79
Surface *get_surface();
81
void update_rect(const Rect& r);
83
void set_caption(const char* str);
91
int get_width(const char *str);
93
Surface *render(const char *str);
94
void render(Surface *s, int x, int y, const char * str);