#include typedef unsigned char byte; struct charinfo { byte width, height, ascent, blanks, rows, bytesperrow; int offset; byte * pattern; }; class Font { protected: int ok; public: int baseline; charinfo * font[128]; Font(string name); ~Font(void); void MeasureString(string st, int & w, int & h); }; class Picture { protected: unsigned int * paper; int paperw, paperh, curcol, origfont; unsigned int dummypaper[10]; public: Font * thefont; Picture(int w, int h, int bgcol=0xFFFFFF); ~Picture(void); void SetPixel(int x, int y); void SetPixel(int x, int y, int c); void DrawLine(int x1, int y1, int x2, int y2, int w=1); void DrawArrow(int x, int y, int dx, int dy, int size, int fatness=1); void LeftOf(int x, int y, int dx, int dy, int dist, int & xx, int & yy); int GetPixel(int x, int y); void FillRectangle(int x, int y, int w, int h, int c); void FillRectangle(int x, int y, int w, int h); void DrawRectangle(int x, int y, int w, int h); void SetFont(Font * f); void SetColour(int c); int DrawChar(int x, int y, int c); int DrawString(int x, int y, string s); int SaveAsBMP(string filename); }; int MakeRGB(int r, int g, int b);