示例#1
0
        public override object Clone()
        {
            var gradientTheme = new GradientTheme(attributeName, minValue, maxValue, (IStyle)MinStyle.Clone(),
                                                  (IStyle)MaxStyle.Clone(),
                                                  (null != FillColorBlend) ? (ColorBlend)FillColorBlend.Clone() : null,
                                                  (null != LineColorBlend) ? (ColorBlend)LineColorBlend.Clone() : null,
                                                  (null != TextColorBlend) ? (ColorBlend)TextColorBlend.Clone() : null, numberOfClasses);

            gradientTheme.ThemeItems.Clear();

            foreach (var themeItem in ThemeItems)
            {
                gradientTheme.ThemeItems.Add((IThemeItem)((GradientThemeItem)themeItem).Clone());
            }

            if (NoDataValues != null)
            {
                gradientTheme.NoDataValues = NoDataValues.Cast <object>().ToArray();
            }

            return(gradientTheme);
        }