Added MatrixAffine2d and switched 2D elements over to using it.