save and restore context for Tooltip drawing