+
+/*virtual*/ bool Circle::HitTest(Point point)
+{
+ SaveState();
+ hitCenter = hitCircle = false;
+ double length = Vector::Magnitude(position, point);
+//printf("Circle::length = %lf, radius = %lf\n", length, radius);
+//How to translate this into pixels from Document space???
+//Maybe we need to pass a scaling factor in here from the caller? That would make sense, as
+//the caller knows about the zoom factor and all that good kinda crap
+/*
+Document passes in the correct Cartesian coordinates being pointed to by the mouse.
+So all we have to be concerned with is properly scaling our hot zones/handle sizes,
+since we generally *don't* want those to scale with the zoom level. ;-)
+
+What is going on here?
+If we're zoomed out to, say, 50%, & our radius is 10.0 (absolute), then on screen
+the radius will be 5.0. By multiplying the length by the zoom factor, we align our
+pointed at length with our on screen length.
+*/
+ if ((length * Painter::zoom) < 8.0)
+ hitCenter = true;
+//wrong: else if ((length < (radius + 2.0)) && (length > (radius - 2.0)))
+/*NB: The following should be identical to what we have down below, but it doesn't work out that way... :-P */
+//close, but no else if (((length * Painter::zoom) < ((radius * Painter::zoom) + 2.0)) && ((length * Painter::zoom) > ((radius * Painter::zoom) - 2.0)))
+//really wrong! else if (((length * Painter::zoom) < (radius + 2.0)) && ((length * Painter::zoom) > (radius - 2.0)))
+// close again, but sill no else if (((length * Painter::zoom) < ((radius + 2.0) * Painter::zoom)) && ((length * Painter::zoom) > ((radius - 2.0) * Painter::zoom)))
+ else if ((fabs(length - radius) * Painter::zoom) < 2.0)
+ hitCircle = true;
+
+ return StateChanged();
+}
+
+
+/*virtual*/ QRectF Circle::Extents(void)
+{
+ return QRectF(QPointF(position.x - radius, position.y - radius), QPointF(position.x + radius, position.y + radius));
+}
+
+
+void Circle::SaveState(void)
+{
+ oldHitCenter = hitCenter;
+ oldHitCircle = hitCircle;
+}
+
+
+bool Circle::StateChanged(void)
+{
+ if ((hitCenter != oldHitCenter) || (hitCircle != oldHitCircle))
+ return true;
+
+ return false;
+}
+
+
+/*virtual*/ void Circle::Enumerate(FILE * file)