Beispiel #1
0
 private void MeasureScalarScaleLabel(Scale scale, double availableWidth, object labelContent, ref double maxLabelCount)
 {
     Size labelSampleSize = this.MeasureLabelString(this.GetLabelSample(labelContent));
     double num = this.EstimateLabelCount(availableWidth, labelSampleSize);
     if (num >= maxLabelCount)
         return;
     maxLabelCount = num;
     maxLabelCount = Math.Min(maxLabelCount, (double)(scale.PreferredMaxCount + 1));
     maxLabelCount = Math.Max(maxLabelCount, 2.0);
     scale.TryChangeMaxCount(maxLabelCount - 1.0);
 }