コード例 #1
0
        private void SetRuleColors(Color[] colorRange, CustomColorCollection customColors)
        {
            MapBucketCollection mapBuckets = m_mapRule.MapBuckets;
            bool flag        = GetDistributionType() == MapRuleDistributionType.Custom;
            int  bucketCount = GetBucketCount();

            for (int i = 0; i < bucketCount; i++)
            {
                CustomColor customColor = new CustomColor();
                if (i < colorRange.Length)
                {
                    customColor.Color = colorRange[i];
                }
                else
                {
                    customColor.Color = Color.Empty;
                }
                if (flag)
                {
                    MapBucket bucket = mapBuckets[i];
                    customColor.FromValue = GetFromValue(bucket);
                    customColor.ToValue   = GetToValue(bucket);
                }
                customColors.Add(customColor);
            }
        }
コード例 #2
0
 private void InitializeCustomColors(CustomColorCollection customColors, SpatialElementTemplateMapper spatialEementTemplateMapper)
 {
     foreach (CustomColor customColor in customColors)
     {
         customColor.BorderColor    = spatialEementTemplateMapper.GetBorderColor(hasScope: false);
         customColor.SecondaryColor = spatialEementTemplateMapper.GetBackGradientEndColor(hasScope: false);
         customColor.GradientType   = spatialEementTemplateMapper.GetGradientType(hasScope: false);
         customColor.HatchStyle     = spatialEementTemplateMapper.GetHatchStyle(hasScope: false);
         customColor.LegendText     = "";
         customColor.Text           = "";
     }
 }