summaryrefslogtreecommitdiff
path: root/include/shape.h
diff options
context:
space:
mode:
authorpixel <pixel>2003-03-31 16:08:24 +0000
committerpixel <pixel>2003-03-31 16:08:24 +0000
commite834c4110af138f8fd4c485999a8294883dbcb0e (patch)
treeb2e35d038cefc27534b230a1dcaba55123dbfd12 /include/shape.h
parent823ad8ed4bd951265fc52d68f6879e83417ded92 (diff)
Working (slowly) on shapes...
Diffstat (limited to 'include/shape.h')
-rw-r--r--include/shape.h46
1 files changed, 46 insertions, 0 deletions
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);