return (n < 0 ? -n : n);
}
+
//
// This function takes three points and draws a curve using a second order
// Bezier function.
p.drawLine(prevX, prevY, (int)p3.x, (int)p3.y);
}
+
+//
+// This is a convenience funtion, using IPoints :-)
+//
+void Bezier(QPainter &p, IPoint p1, IPoint p2, IPoint p3)
+{
+ Bezier(p, point(p1.x, p1.y), point(p2.x, p2.y), point(p3.x, p3.y));
+}
+
+
//
// Draw a round dot (5x5, centered on [x, y])
//
p.drawPolygon(pt, 8);
}
+
//
// Draw a sqaure dot (5x5, centered on [x, y])
//
p.drawPolygon(pt, 4);
}
+
//
// Draw a sqaure dot (nxn, centered on [x, y])
//
p.drawPolygon(pt, 4);
}
+
//
// Draw a round dot (nxn, centered on [x, y])
//