update makeSpeechRect to handle tip positions outside the rectangle