Exemplo n.º 1
0
            public void ShouldSetThePropertiesToTheCorrectValue()
            {
                var affine = new DrawableAffine();

                affine.TransformSkewX(4.0);

                Assert.Equal(1.0, affine.ScaleX);
                Assert.Equal(1.0, affine.ScaleY);
                Assert.InRange(affine.ShearX, 0.0699, 0.0700);
                Assert.Equal(0.0, affine.ShearY);
                Assert.Equal(0.0, affine.TranslateX);
                Assert.Equal(0.0, affine.TranslateY);
            }
        public void Test_TransformSkew()
        {
            DrawableAffine affine = new DrawableAffine();

            affine.TransformSkewX(4.0);

            Assert.Equal(1.0, affine.ScaleX);
            Assert.Equal(1.0, affine.ScaleY);
            Assert.InRange(affine.ShearX, 0.0699, 0.0700);
            Assert.Equal(0.0, affine.ShearY);
            Assert.Equal(0.0, affine.TranslateX);
            Assert.Equal(0.0, affine.TranslateY);

            affine.TransformSkewY(2.0);

            Assert.Equal(1.0, affine.ScaleX);
            Assert.InRange(affine.ScaleY, 1.0024, 1.0025);
            Assert.InRange(affine.ShearX, 0.0699, 0.0700);
            Assert.InRange(affine.ShearY, 0.0349, 0.0350);
            Assert.Equal(0.0, affine.TranslateX);
            Assert.Equal(0.0, affine.TranslateY);
        }
Exemplo n.º 3
0
        public void Test_TransformSkew()
        {
            DrawableAffine affine = new DrawableAffine();

            affine.TransformSkewX(4.0);

            Assert.AreEqual(1.0, affine.ScaleX);
            Assert.AreEqual(1.0, affine.ScaleY);
            Assert.AreEqual(0.0699, affine.ShearX, 0.0001);
            Assert.AreEqual(0.0, affine.ShearY);
            Assert.AreEqual(0.0, affine.TranslateX);
            Assert.AreEqual(0.0, affine.TranslateY);

            affine.TransformSkewY(2.0);

            Assert.AreEqual(1.0, affine.ScaleX);
            Assert.AreEqual(1.0024, affine.ScaleY, 0.0001);
            Assert.AreEqual(0.0699, affine.ShearX, 0.0001);
            Assert.AreEqual(0.0349, affine.ShearY, 0.0001);
            Assert.AreEqual(0.0, affine.TranslateX);
            Assert.AreEqual(0.0, affine.TranslateY);
        }