• λ我爱Aspx >> Asp.Net >> 源码推荐:一个使用C#绘制图形引擎的Framework
  • 源码推荐:一个使用C#绘制图形引擎的Framework

  • :未知  Դ:internet  :2007-5-5 19:47:58  ؼ:c#
  • this.legendFont = new Font(baseFont.FontFamily,

    (baseFont.Size * 2/3), baseFont.Style | FontStyle.Bold);

    g.SmoothingMode = SmoothingMode.AntiAlias;

    CalculateChartDimensions();

    DrawBackground();

    InternalDrawChart() ;

    }

    private void CalculateChartDimensions() {

    right = r.Width - 5;

    top = 5 * baseFont.Size ;

    bottom = r.Height - baseFont.Size * 2;

    tickCount = chartData.YMin ;

    yCount = (chartData.YMax-chartData.YMin) / chartData.YTickSize ;

    hspacing = (bottom-top) / yCount;

    vspacing = (right) / chartData.XAxisTitles.Length;

    //Left depends on width of text - for simplicities sake assume that largest yvalue is the biggest

    //Take into account the first X Axis title

    float maxYTextSize = g.MeasureString(chartData.YMax.ToString(), baseFont).Width;

    float firstXTitle = g.MeasureString(chartData.XAxisTitles[0], baseFont).Width;

    left = (maxYTextSize > firstXTitle) ? maxYTextSize : firstXTitle ;

    left = r.X + left + 5 ;

    //Calculate size of legend box

    float maxLegendWidth = 0 ;

    float maxLegendHeight = 0 ;

    //Work out size of biggest legend

    foreach (ChartLine cl in chartData.Lines) {

    float currentWidth = g.MeasureString(cl.Title, legendFont).Width;

    float currentHeight = g.MeasureString(cl.Title, legendFont).Height;

    maxLegendWidth = (maxLegendWidth > currentWidth) ? maxLegendWidth : currentWidth ;

    Ҷƪл˵?
  • һƪOICQ 99c版本加密方法研究报告
    һƪ如何写系统分析书