tooltip drawing and positioning