Implement hit testing methods in subclasses of Shape.