+ else if ((distance * Painter::zoom) < 5.0)
+ hitLine = true;
+
+ if ((hFSPoint.Magnitude() * Painter::zoom) < 8.0)
+ hitFlipSwitch = true;
+ else if ((hCS1Point.Magnitude() * Painter::zoom) < 8.0)
+ hitChangeSwitch1 = true;
+ else if ((hCS2Point.Magnitude() * Painter::zoom) < 8.0)
+ hitChangeSwitch2 = true;
+
+ return (hitPoint1 || hitPoint2 || hitLine || hitFlipSwitch || hitChangeSwitch1 || hitChangeSwitch2 ? true : false);
+}
+
+
+void Dimension::SaveHitState(void)
+{
+ oldHitPoint1 = hitPoint1;
+ oldHitPoint2 = hitPoint2;
+ oldHitLine = hitLine;
+ oldHitFlipSwitch = hitFlipSwitch;
+ oldHitChangeSwitch1 = hitChangeSwitch1;
+ oldHitChangeSwitch2 = hitChangeSwitch2;
+}
+
+
+bool Dimension::HitStateChanged(void)
+{
+ if ((hitPoint1 != oldHitPoint1) || (hitPoint2 != oldHitPoint2)
+ || (hitLine != oldHitLine) || (hitFlipSwitch != oldHitFlipSwitch)
+ || (hitChangeSwitch1 != oldHitChangeSwitch1)
+ || (hitChangeSwitch2 != oldHitChangeSwitch2))
+ return true;
+
+ return false;
+}
+
+
+/*virtual*/ void Dimension::Translate(Vector amount)
+{
+ position += amount;
+ endpoint += amount;
+}
+
+
+/*virtual*/ void Dimension::Rotate(Point point, double angle)
+{
+ Point l1 = Geometry::RotatePointAroundPoint(position, point, angle);
+ Point l2 = Geometry::RotatePointAroundPoint(endpoint, point, angle);
+ position = l1;
+ endpoint = l2;
+}
+
+
+/*virtual*/ void Dimension::Mirror(Point p1, Point p2)
+{
+ Point l1 = Geometry::MirrorPointAroundLine(position, p1, p2);
+ Point l2 = Geometry::MirrorPointAroundLine(endpoint, p1, p2);
+ position = l1;
+ endpoint = l2;
+}