110,537
社区成员
发帖
与我相关
我的任务
分享
Graphics g = Graphics.FromHwnd(this.Handle);
Pen p = new Pen(Color.Black);
p.EndCap = LineCap.ArrowAnchor;
g.DrawLine(p, new Point(100, this.Height - 100), new Point(this.Width - 100, this.Height - 100));
g.DrawString("x", this.Font, new SolidBrush(Color.Black), new Point(this.Width - 100 + 5, this.Height - 100));
p.EndCap = LineCap.ArrowAnchor;
g.DrawLine(p, new Point(150, this.Height - 50), new Point(150, 100));
g.DrawString("y", this.Font, new SolidBrush(Color.Black), new Point(150, 100 - 20));
int pointCount = 2;
float[] pointX = new float[] {12213.00f,11221.00f};
float[] pointY = new float[] { 32.4f, 33.1f };
PointF[] pointF = new PointF[pointCount];
for (int i = 0; i < pointCount; i++) {
pointF[i] = new PointF(pointX[i], pointY[i]);
}
g.DrawCurve(p, pointF, 1f);
p.Dispose();
g.Dispose();