示例#1
0
 public void ClonePerformanceTest()
 {
     var colorBlend = new ColorBlend(new[] { Color.Black, Color.White }, new[] { 0.0f, 1.0f });
     var gradientTheme = new GradientTheme("aa", 0, 20, new VectorStyle(), new VectorStyle(), colorBlend,
                                           colorBlend, colorBlend, 5) { NoDataValues = new List<double> { -9999 } };
     TestHelper.AssertIsFasterThan(30,() => gradientTheme.Clone());
 }
示例#2
0
        public void CloneGradientThemeWithNoDataValues()
        {
            var colorBlend = new ColorBlend(new[]{Color.Black, Color.White}, new[]{0.0f,1.0f});
            var gradientTheme = new GradientTheme("aa", 0, 20, new VectorStyle(), new VectorStyle(), colorBlend,
                                                  colorBlend, colorBlend)
                                                  {NoDataValues = new List<double>{-9999}};

            var gradientThemeClone = gradientTheme.Clone();

            Assert.AreEqual(gradientTheme.NoDataValues, ((GradientTheme)gradientThemeClone).NoDataValues);
        }
示例#3
0
        public void CloneGradientThemeWithNoDataValues()
        {
            var colorBlend = new ColorBlend(new[]{Color.Black, Color.White}, new[]{0.0f,1.0f});
            var gradientTheme = new GradientTheme("aa", 0, 20, new VectorStyle(), new VectorStyle(), colorBlend,
                                                  colorBlend, colorBlend,5)
                                                  {NoDataValues = new List<double>{-9999}};

            var gradientThemeClone = (GradientTheme)gradientTheme.Clone();

            Assert.AreEqual(gradientTheme.NoDataValues, (gradientThemeClone).NoDataValues);
            Assert.AreEqual(5,gradientThemeClone.NumberOfClasses);
            Assert.AreEqual(2,gradientThemeClone.FillColorBlend.Colors.Length);
        }