Pixel-perfect hit testing for objects