Пример #1
0
 public static SharpDX.Matrix3x2 ToSharpDX(
     this Jupiter.Media.Matrix matrix)
 {
     return(new Matrix3x2(
                (float)matrix.M11,
                (float)matrix.M12,
                (float)matrix.M21,
                (float)matrix.M22,
                (float)matrix.OffsetX,
                (float)matrix.OffsetY));
 }
Пример #2
0
        private static bool FastStringToMatrix(Type outputType, string input, ref object output)
        {
            if (outputType == typeof(Windows.UI.Xaml.Media.Matrix))
            {
                var fields = input
                             .Split(',')
                             ?.Select(v => double.Parse(v, CultureInfo.InvariantCulture))
                             ?.ToArray();

                output = new Windows.UI.Xaml.Media.Matrix(fields[0], fields[1], fields[2], fields[3], fields[4], fields[5]);
                return(true);
            }

            return(false);
        }
Пример #3
0
 public static Matrix3x2 ToMatrix3x2(this Media.Matrix m)
 {
     return(new Matrix3x2((float)m.M11, (float)m.M12, (float)m.M21, (float)m.M22, (float)m.OffsetX, (float)m.OffsetY));
 }
Пример #4
0
 public static Matrix3x3 ToMatrix3x3(this Media.Matrix m)
 {
     return(new Matrix3x3((float)m.M11, (float)m.M12, 0, (float)m.M21, (float)m.M22, 0f, (float)m.OffsetX, (float)m.OffsetY, 1f));
 }