c#画笔Pen自定义线的帽子
1.using System;
2.using System.Collections.Generic;
3.using System.ComponentModel;
4.using System.Data;
5.using System.Drawing;
6.using System.Text;
7.using System.Windows.Forms;
8.using System.Drawing.Drawing2D;
9.10.namespace WindowsApplication2
11.{
12. public partial class Form11 : Form
13. {
14. public Form11()
15. {
16. InitializeComponent();
17. }
18.19. private void button1_Click(object sender, EventArgs e)
20. {
21. Pen pen1 = new Pen(Color.Blue, 12);
22. pen1.EndCap = LineCap.Custom;
23. pen1.CustomEndCap = new AdjustableArrowCap(5f, 5f, true);
24. Graphics g1 = this.CreateGraphics();
25. g1.DrawLine(pen1, 10, 100, 100,100);
26.27. }
28. }
29.}