A boundary condition

Given $$d\colon [0,1]\to \mathbb{R}^2$$, with $$d(0)=d(1)=0$$, I want to find a function $$c\colon [0,1]^2\to \mathbb{R}^2$$ such that $$c(x,0)-c(1,0)+c(0,1)-c(x,1)+c(1,x)-c(0,x)=d(x)$$, for all $$x\in [0,1]$$. I was thinking about consider $$c(x,0)-c(1,0)$$, $$c(0,1)-c(x,1)$$ and $$c(1,x)-c(0,x)$$ as the integral of $$c$$ along some paths in $$\mathbb{R}^2$$, and think of $$c$$ as some kind of a potential function, but I don't know how to proceed.