Tag Archives: compound lines

Draw rainbow compound lines in WPF and C#

The post Make compound lines in WPF and C# shows how to make compound lines, lines that are striped lengthwise. Once you know how to do that, it’s easy to make rainbow compound lines. The following code shows how this … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , , , | 2 Comments

Make compound lines in WPF and C#

In order to draw an outlined path, the post Draw an outlined path in WPF and C# explained how to find the left and right edge points for a path. This post explains how to use those points to draw … Continue reading

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

Draw symmetric compound lines in WPF and C#

I’ve often said that WPF’s unofficial slogan should be, “Twice as flexible and only 10 times as hard.” Drawing compound lines is one of the few places where WPF isn’t twice as flexible. A compound line is one that is … Continue reading

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

Draw striped lines in C#

You can use the Pen class to draw striped lines. That class’s CompoundArray property stores an array of floats that gives the fraction of the line’s width that is drawn and skipped. For example, the array 0.0, 0.25, 0.75, 1.0 … Continue reading

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