Пример #1
0
        internal static MatrixFP ToMatrixFP(AffineTransform matrix)
        {
            if (matrix == null)
            {
                return(null);
            }
            if (matrix.IsIdentity())
            {
                return(MatrixFP.Identity);
            }

            MatrixFP matrixFP = new MatrixFP(SingleFP.FromDouble(matrix.GetScaleX()),
                                             SingleFP.FromDouble(matrix.GetScaleY()),
                                             SingleFP.FromDouble(matrix.GetShearX()),
                                             SingleFP.FromDouble(matrix.GetShearY()),
                                             SingleFP.FromDouble(matrix.GetTranslateX()),
                                             SingleFP.FromDouble(matrix.GetTranslateY()));

            return(matrixFP);
        }