code: def check_hit(self, x, y):
          
          extents = self.get_extents()
  
          if not extents:
              return False
  
          if extents.x <= x <= extents.x + extents.width and extents.y <= y <= extents.y + extents.height:
              return self._stroke_context is None or self._stroke_context.in_fill(x, y)
          else:
              return False
docs: check if the given coordinates are inside the sprite's fill or stroke path