From feba563611f39efe4f71cf09347d5aa9cd13ada6 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 4 Apr 2003 15:06:29 +0000 Subject: Finished filling --- include/shape.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'include/shape.h') diff --git a/include/shape.h b/include/shape.h index e06115e..6bbf94e 100644 --- a/include/shape.h +++ b/include/shape.h @@ -24,10 +24,13 @@ namespace mogltk { virtual ~fill(); void walk(fillwalker *); void insert(int, int); - int GetMinX(); - int GetMinY(); - int GetMaxX(); - int GetMaxY(); + int GetMinX() const; + int GetMinY() const; + int GetMaxX() const; + int GetMaxY() const; + texture * GetTexture(); + texture * Talloc(); + Color last; private: class sline : public Base { public: @@ -59,6 +62,7 @@ namespace mogltk { friend class point; }; int minX, minY, maxX, maxY; + texture * cached; protected: sline * header; friend class sline; @@ -69,7 +73,7 @@ namespace mogltk { virtual void circle(int x, int y, int r, ColorP = WHITE); virtual void pcircle(int x, int y, int r, ColorP = WHITE); virtual fill * fcircle(int x, int y, int r); - virtual void fdraw(fill *, ColorP = WHITE); + virtual void fdraw(fill *, ColorP = WHITE, int sx = 0, int sy = 0); virtual void arc(int x, int y, int r, double a1, double a2, ColorP = DOS_WHITE); virtual void arc(int x, int y, int r, int x1, int y1, int x2, int y2, ColorP = DOS_WHITE); virtual void box(int x1, int y1, int x2, int y2, ColorP = DOS_WHITE); @@ -109,6 +113,18 @@ namespace mogltk { virtual bool Enter(); virtual void Leave(bool); }; + + class filldrawer : public fillwalker { + public: + filldrawer(fill *, texture *, ColorP = DOS_WHITE); + virtual ~filldrawer(); + virtual void step(int x, int y); + private: + fill * f; + texture * t; + ColorP c; + int oldx, oldy; + }; }; #endif -- cgit v1.2.3