summaryrefslogtreecommitdiff
path: root/lib/shape.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shape.cc')
-rw-r--r--lib/shape.cc38
1 files changed, 38 insertions, 0 deletions
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);