Tag Archives: line caps

Use base insets with custom end caps in C#

The example Draw lines with custom end caps in C# shows how to draw lines with custom end caps. For example, using those techniques you can draw lines with arrowheads or circles at the ends. The coordinate system for drawing … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , | Leave a comment

Draw lines with end caps in C#

The Pen class’s StartCap and EndCap properties determine how a line draws its end caps. This example uses the following code to draw samples of the predefined end caps. private void Form1_Paint(object sender, PaintEventArgs e) { e.Graphics.Clear(BackColor); e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , | Leave a comment