From e834c4110af138f8fd4c485999a8294883dbcb0e Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 31 Mar 2003 16:08:24 +0000 Subject: Working (slowly) on shapes... --- include/shape.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'include/shape.h') diff --git a/include/shape.h b/include/shape.h index fdae6af..720d4a2 100644 --- a/include/shape.h +++ b/include/shape.h @@ -12,6 +12,52 @@ namespace mogltk { CENTER, RIGHT } align_t; + class fillwalker : public Base { + public: + fillwalker(); + virtual ~fillwalker(); + virtual void step(int x, int y); + }; + class fill : public Base { + public: + fill(); + virtual ~fill(); + void walk(fillwalker *); + void insert(int, int); + private: + class sline : public Base { + public: + sline(int, fill *); + virtual ~sline(); + int GetY() const; + void insert(int, int); + void walk(fillwalker *); + private: + class point : public Base { + public: + point(int, sline *); + virtual ~point(); + int GetX() const; + int GetY() const; + void walk(fillwalker *); + private: + int x; + point * next; + sline * header; + point * look(int); + }; + int y; + sline * next; + sline * look(int); + protected: + point * pheader; + fill * header; + friend class point; + }; + protected: + sline * header; + friend class sline; + }; class shape : public Base { public: virtual void pixel(int x, int y, ColorP = WHITE); -- cgit v1.2.3