/// <summary>
/// 获取画坐标轴所需的线
/// </summary>
/// <param name="xPts">x轴</param>
/// <param name="yPts">y轴</param>
/// <param name="strxPts">x轴文字和坐标字典,0,1,2,3...</param>
/// <param name="stryPts">y轴文字和坐标字典</param>
private void GetLines(ref List<Point[]> xPts, ref List<Point[]> yPts, ref Dictionary<string, PointF> strxPts, ref Dictionary<string, PointF> stryPts)
{
strxPts = new Dictionary<string, PointF>();
stryPts = new Dictionary<string, PointF>();
xPts = new List<Point[]>();
yPts = new List<Point[]>();
int sx = 25;
int xtopY = 32;
for (int i = 0; i < 100; i++)
{
sx += 6;
if (i % 10 == 0)
{
strxPts.Add(i.ToString(), new PointF(sx - (i.ToString().Length * 3 + 2), xtopY - 14));
xPts.Add(new Point[] { new Point(sx, xtopY - 2), new Point(sx, xtopY + 3) });
}
else
{
xPts.Add(new Point[] { new Point(sx, xtopY), new Point(sx, xtopY + 3) });
}
}
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载