This article illustrates the method of using a composite array to draw a single rectangle. Share it for your reference. The specific implementation method is as follows:
using System; using ; using ; using ; using ; using ; using ; using .Drawing2D; namespace WindowsApplication2 { public partial class Form11 : Form { public Form11() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Pen pen3 = new Pen(, 20); = new float[] { 0.0f, 0.25f, 0.45f, 0.55f, 0.75f, 1.0f }; Graphics g3 = (); (pen3, new Rectangle(50, 50, 300, 200)); } } }
I hope this article will be helpful to everyone's C# programming.