コード例 #1
0
        private void SetPathRuleSizes(CustomWidthCollection customWidths)
        {
            int bucketCount = GetBucketCount();

            if (bucketCount == 0)
            {
                return;
            }
            double startSize = GetStartSize();
            double num       = (GetEndSize() - startSize) / (double)bucketCount;
            MapBucketCollection mapBuckets = m_mapRule.MapBuckets;
            bool flag = GetDistributionType() == MapRuleDistributionType.Custom;

            for (int i = 0; i < bucketCount; i++)
            {
                CustomWidth customWidth = new CustomWidth();
                customWidth.Width = (int)Math.Round(startSize + (double)i * num);
                if (flag)
                {
                    MapBucket bucket = mapBuckets[i];
                    customWidth.FromValue = GetFromValue(bucket);
                    customWidth.ToValue   = GetToValue(bucket);
                }
                customWidths.Add(customWidth);
            }
        }
コード例 #2
0
        private void SetPathRuleSizes(CustomWidthCollection customWidths)
        {
            int bucketCount = base.GetBucketCount();

            if (bucketCount != 0)
            {
                double startSize = this.GetStartSize();
                double num       = (this.GetEndSize() - startSize) / (double)bucketCount;
                MapBucketCollection mapBuckets = base.m_mapRule.MapBuckets;
                bool flag = base.GetDistributionType() == MapRuleDistributionType.Custom;
                for (int i = 0; i < bucketCount; i++)
                {
                    CustomWidth customWidth = new CustomWidth();
                    customWidth.Width = (float)(int)Math.Round(startSize + (double)i * num);
                    if (flag)
                    {
                        MapBucket bucket = ((ReportElementCollectionBase <MapBucket>)mapBuckets)[i];
                        customWidth.FromValue = base.GetFromValue(bucket);
                        customWidth.ToValue   = base.GetToValue(bucket);
                    }
                    customWidths.Add(customWidth);
                }
            }
        }
コード例 #3
0
 get => new CGSize(CustomWidth, CustomHeight);