Try to use contentsRect function.