- Surface();
- ~Surface();
-
- void Init();
- void Init(SurfaceID hdc_);
- void InitPixMap(int width, int height, Surface *surface_);
-
- void Release();
- bool Initialised();
- void PenColour(Colour fore);
- int LogPixelsY();
- void MoveTo(int x_, int y_);
- void LineTo(int x_, int y_);
- void Polygon(Point *pts, int npts, Colour fore, Colour back);
- void RectangleDraw(PRectangle rc, Colour fore, Colour back);
- void FillRectangle(PRectangle rc, Colour back);
- void FillRectangle(PRectangle rc, Surface &surfacePattern);
- void RoundedRectangle(PRectangle rc, Colour fore, Colour back);
- void Ellipse(PRectangle rc, Colour fore, Colour back);
- void Copy(PRectangle rc, Point from, Surface &surfaceSource);
-
- void DrawText(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
- void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
- void MeasureWidths(Font &font_, const char *s, int len, int *positions);
- int WidthText(Font &font_, const char *s, int len);
- int WidthChar(Font &font_, char ch);
- int Ascent(Font &font_);
- int Descent(Font &font_);
- int InternalLeading(Font &font_);
- int ExternalLeading(Font &font_);
- int Height(Font &font_);
- int AverageCharWidth(Font &font_);
-
- int SetPalette(Palette *pal, bool inBackGround);
- void SetClip(PRectangle rc);
- void FlushCachedState();
+ Surface() {};
+ virtual ~Surface() {};
+ static Surface *Allocate();
+
+ virtual void Init()=0;
+ virtual void Init(SurfaceID sid)=0;
+ virtual void InitPixMap(int width, int height, Surface *surface_)=0;
+
+ virtual void Release()=0;
+ virtual bool Initialised()=0;
+ virtual void PenColour(ColourAllocated fore)=0;
+ virtual int LogPixelsY()=0;
+ virtual int DeviceHeightFont(int points)=0;
+ virtual void MoveTo(int x_, int y_)=0;
+ virtual void LineTo(int x_, int y_)=0;
+ virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0;
+ virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
+ virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0;
+ virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0;
+ virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
+ virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
+ virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0;
+
+ virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0;
+ virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0;
+ virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0;
+ virtual int WidthText(Font &font_, const char *s, int len)=0;
+ virtual int WidthChar(Font &font_, char ch)=0;
+ virtual int Ascent(Font &font_)=0;
+ virtual int Descent(Font &font_)=0;
+ virtual int InternalLeading(Font &font_)=0;
+ virtual int ExternalLeading(Font &font_)=0;
+ virtual int Height(Font &font_)=0;
+ virtual int AverageCharWidth(Font &font_)=0;
+
+ virtual int SetPalette(Palette *pal, bool inBackGround)=0;
+ virtual void SetClip(PRectangle rc)=0;
+ virtual void FlushCachedState()=0;
+
+ virtual void SetUnicodeMode(bool unicodeMode_)=0;