public override IMathTransform Inverse()
{
if (_inverseMatrix == null)
{
_inverseMatrix = _matrix.GetInverseMatrix();
//values may differ slightly from the exact,
//in which case check the affinity will not be passed,
//so set the value of the third column manually
_inverseMatrix[0, 2] = 0;
_inverseMatrix[1, 2] = 0;
_inverseMatrix[2, 2] = 1;
}
_inverse = new Affine(_matrix, _inverseMatrix, !_isInverse);
return _inverse;
}