use docToWindowPoint to transform document rect to screen rect