proper cursor coordinates for pencil