From e0f0cfd81fbec4fc20a591409f1bef67e16d62e7 Mon Sep 17 00:00:00 2001 From: pixel Date: Tue, 20 May 2003 01:53:24 +0000 Subject: Bugfixes --- lib/shape.cc | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'lib/shape.cc') diff --git a/lib/shape.cc b/lib/shape.cc index fcca584..f566f3d 100644 --- a/lib/shape.cc +++ b/lib/shape.cc @@ -115,6 +115,13 @@ void mogltk::fill::insert(int x1, int y1, int x2, int y2) { insert(x + i2, y); } +void mogltk::fill::insertfix(int x, int y) { + if (!header) + return; + + header->insertfix(x, y); +} + int mogltk::fill::GetMaxX() const { return maxX; } @@ -217,6 +224,31 @@ void mogltk::fill::sline::insert(int ax, int ay) { } } +void mogltk::fill::sline::insertfix(int ax, int ay) { + sline * f; + + if (ay == y) { + if (count() & 1) { + insert(ax, ay); + } + } else { + f = header->header->look(ay); + if (!f) + return; + + f->insertfix(ax, ay); + } +} + +int mogltk::fill::sline::count() const { + int r = 0; + + if (next) + r = next->count(); + + return r + 1; +} + void mogltk::fill::sline::walk(fillwalker * w) { if (pheader) pheader->walk(w); @@ -653,6 +685,8 @@ void mogltk::filldrawer::step(int x, int y) { void mogltk::shape::fdraw(fill * f, ColorP c, int sx, int sy) { ENTER; + if (!f) + return; if (!f->GetTexture()) { filldrawer * w = new filldrawer(f, f->Talloc(), c); f->walk(w); @@ -690,6 +724,10 @@ void mogltk::segdrawer::step(int x1, int y1, int x2, int y2) { void mogltk::shape::sdraw(fill * f, ColorP c, int sx, int sy) { ENTER; + + if (!f) + return; + if (!f->GetSTexture()) { segdrawer * w = new segdrawer(f, f->STalloc(), c); f->swalk(w); -- cgit v1.2.3