Пример #1
0
        public void Extents_Clone_As_Extents()
        {
            Extents extents    = new Extents(StarRegion);
            Extents newExtents = extents.Clone();

            Assert.That(newExtents.MaxLatitude, Is.EqualTo(89));
            Assert.That(newExtents.MinLatitude, Is.EqualTo(-90));
            Assert.That(newExtents.MaxLongitude, Is.EqualTo(90));
            Assert.That(newExtents.MinLongitude, Is.EqualTo(-90));
        }
Пример #2
0
        public void Extents_Clone_As_Object()
        {
            Extents extents     = new Extents(StarRegion);
            object  newExtents  = extents.Clone();
            Extents castExtents = (Extents)newExtents;

            Assert.That(castExtents.MaxLatitude, Is.EqualTo(89));
            Assert.That(castExtents.MinLatitude, Is.EqualTo(-90));
            Assert.That(castExtents.MaxLongitude, Is.EqualTo(90));
            Assert.That(castExtents.MinLongitude, Is.EqualTo(-90));
        }
Пример #3
0
        public void ExtentsClone()
        {
            tlog.Debug(tag, $"ExtentsClone START");

            using (Extents extents = new Extents(20, 20, 20, 20))
            {
                var testingTarget = extents.Clone();
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <Extents>(testingTarget, "should be an instance of testing target class!");
            }

            tlog.Debug(tag, $"ExtentsClone END (OK)");
        }
Пример #4
0
        internal SLTransform2D Clone()
        {
            var trans = new SLTransform2D();

            trans.HasOffset  = HasOffset;
            trans.Offset     = Offset.Clone();
            trans.HasExtents = HasExtents;
            trans.Extents    = Extents.Clone();

            trans.Rotation       = Rotation;
            trans.HorizontalFlip = HorizontalFlip;
            trans.VerticalFlip   = VerticalFlip;

            return(trans);
        }