I'm reading a short text called "The Planimeter as an Example of Green's Theorem", written by Ronald W. Gatterdam. In the text, there is a figure of an idealized planimeter, shown below.
After the image is presented, without much explanation, the author comes up with these two equalities:
$$dr=\frac{x}{r}dx+\frac{y}{r}dy,$$ $$d\theta=\frac{-y}{r^2}dx+\frac{x}{r^2}dy.$$
My question is: how did he get to these equalities?
I tried to figure out by myself, but couldn't get to an answer.
I appreciate any help!

One writes $r^2=x^2+y^2$ so that $2 r dr= 2x dx+2y dy$, $\theta = \arctan ({y\over x})+C$.
As $d \arctan u= {du\over 1+u^2}$, $d \theta = ({dy\over x}-{y d x\over x^2}).{1\over 1+{y^2\over x^2}}$ =${x dy -y dx} \over x^2+y^2$