Take clipping and masks into account when hit testing