You are thinking of the wrong type of integration. Actually it is unclear what precisely you are thinking of, but it is not the correct type of integration.
First, remember that $f$ has complex values as well as complex input. When we write "$f(z)$", "$z$" is the input, or argument, what goes into the function, while the whole term $f(z)$ refers to the value of the function, or the output. You could also write $w=f(z)$ to make explicit that $z$ and $w$ are respectively the input and output variables, and $f$ sends the complex number $z$ to the complex number $w$.
But even in the real-valued case, a line integral along a curve is not typically interpreted as an area. In the complex-valued case, "area under the path" makes even less sense. The integral of $f$ along a path $\gamma$ can be defined as a Riemann-Stieltjes integral. In the case where $\gamma:[a,b]\to\mathbb C$ is a piecewise continuously differentiable path, it turns out that \int_{\gamma}f(z)dz=\int_a^b f(\gamma(t))\gamma'(t)dt. For example if $\gamma:[0,2\pi]\to\mathbb C$ parametrizes the unit circle with $\gamma(t)=e^{it}$, and if $f(z)=1$, then $\int_\gamma f(z)dz=\int_0^{2\pi}ie^{it}dt=0$.
Your book is correct, and this is a consequence of Cauchy's theorem. If you have $2$ different paths $\gamma_1$ and $\gamma_2$, that start and end at the same place, then if you take $\gamma_1$ followed by the reverse of $\gamma_2$, you get a closed curve in your domain, and the integral of $f$ on the closed curve is $0$ by Cauchy's theorem. If you unwind this it shows that $\int_{\gamma_1}f(z)dz=\int_{\gamma_2}f(z)dz$.