/// <summary> /// Using a visitor like pattern, it lets the other shape know what shape it is and lets the other shape calculate whether or not there is an overlap. /// </summary> /// <param name="shape"></param> /// <param name="offset"></param> /// <returns></returns> public abstract bool Overlaps(Shape shape, PointF offset);
public override bool Overlaps(Shape shape, PointF offset) { PointF negativeOffset = new PointF(-offset.X, -offset.Y); return shape.Overlaps(this, negativeOffset); }