Ejemplo n.º 1
0
        public void TranslationToMatrixIsCorrect()
        {
            var m   = SKMatrix.CreateTranslation(5, 7);
            var rsm = SKRotationScaleMatrix.CreateTranslation(5, 7).ToMatrix();

            Assert.Equal(m.Values, rsm.Values);
        }
Ejemplo n.º 2
0
        public void RotationToMatrixIsCorrect()
        {
            var m   = SKMatrix.CreateRotationDegrees(45);
            var rsm = SKRotationScaleMatrix.CreateRotationDegrees(45, 0, 0).ToMatrix();

            Assert.Equal(m.Values, rsm.Values);
        }
Ejemplo n.º 3
0
        public void ScaleToMatrixIsCorrect()
        {
            var m   = SKMatrix.CreateScale(3.5f, 3.5f);
            var rsm = SKRotationScaleMatrix.CreateScale(3.5f).ToMatrix();

            Assert.Equal(m.Values, rsm.Values);
        }
Ejemplo n.º 4
0
        public void ImplicitFromRotationScale()
        {
            var rs       = SKRotationScaleMatrix.CreateRotationDegrees(45, 0, 0);
            var matrix   = SKMatrix.CreateRotationDegrees(45);
            var matrix44 = (SKMatrix44)rs.ToMatrix();

            Assert.Equal(matrix.Values, matrix44.Matrix.Values);
        }