We consider the estimation of 2D affine transformations aligning a known binary shape and its distorted observation. The classical way to solve this registration problem is to find correspondences between the two images and then compute the transformation parameters from these landmarks. In this paper, we propose a novel approach where the exact transformation is obtained as a least-squares solution of a linear system. The basic idea is to fit a Gaussian density to the shapes which preserves the effect of the unknown transformation. It can also be regarded as a consistent coloring of the shapes yielding two rich functions defined over the two shapes to be matched. The advantage of the proposed solution is that it is fast, easy to implement, works without established correspondences and provides a unique and exact solution regardless of the magnitude of transformation.