我爱Aspx >> Asp.Net >> 源码推荐:一个使用C#绘制图形引擎的Framework}
//Horizontal
if (chartData.ShowHGridLines) {
for (float i = bottom ; i > top; i-=hspacing) {
string desc = tickCount.ToString();
tickCount+=chartData.YTickSize;
g.DrawLine(gridPen, right, i, left-3, i);
SizeF textsize = g.MeasureString(desc,baseFont);
g.DrawString(desc, baseFont, new SolidBrush(chartData.GridColor), left-textsize.Width - 3, i - (textsize.Height/2)) ;
}
}
}
private void DrawLine(ChartLine chartLine) {
Pen linePen = new Pen(chartLine.Color);
linePen.StartCap = LineCap.Round;
linePen.EndCap = LineCap.Round;
linePen.Width = chartLine.Width ;
linePen.DashStyle = chartLine.LineStyle;
PointF[] Values = new PointF[chartLine.Values.Length];
float scale = hspacing / chartData.YTickSize ;
for (int i = 0 ; i < chartLine.Values.Length; i++) {
float x = left + vspacing * i;
Values[i] = new PointF(x, bottom-chartLine.Values[i]*scale);
}
g.DrawLines(linePen, Values);
}
private void DrawLegend() {
//Draw Legend Box
ControlPaint.DrawBorder(g, (Rectangle)legendRect, SystemColors.WindowFrame, ButtonBorderStyle.Solid);
LinearGradientBrush b = new LinearGradientBrush(legendRect, backColor, Color.SteelBlue, LinearGradientMode.Horizontal);
r.Inflate(-1, -1);
g.FillRectangle(b, legendRect);
b.Dispose();
float startY = 5;
Ҷƪл˵?
在C#里如何调用标准DLL函数[05-05]
C#抢鲜快报之FAQ20[05-05]
Beginner with c# 7[05-05]
Beginner with c# 6[05-05]
Beginner with c# 5[05-05]
Beginner with c# 4[05-05]
Beginner with c# 3[05-05]
Beginner with c# 2[05-05]
Beginner with C#[05-05]
源码推荐:一个使用C#绘制图形引..[05-05]
如何写系统分析书[05-05]
一个统一的链表结构[05-05]
优化delphi5.0秘籍大曝光[05-05]
在C#里如何调用标准DLL函数[05-05]
开放源代码的定义[05-05]
MMX Instructions[05-05]
Opcodes of intel[05-05]
程序员与MM[05-05]
用CTI实现与Web交谈[05-05]
CTI技术和呼叫中心[05-05]