diff --git a/src/ImageSharp/Drawing/Brushes/Brushes.cs b/src/ImageSharp/Drawing/Brushes/Brushes.cs index 391ff826ca..5de4287b73 100644 --- a/src/ImageSharp/Drawing/Brushes/Brushes.cs +++ b/src/ImageSharp/Drawing/Brushes/Brushes.cs @@ -172,6 +172,7 @@ namespace ImageSharp.Drawing.Brushes // ^ // | X - axis // | + // see PatternBrush for details about how to make new patterns work private static readonly bool[,] Percent10Pattern = new bool[,] { { true, false, false, false }, diff --git a/src/ImageSharp/Drawing/Brushes/PatternBrush.cs b/src/ImageSharp/Drawing/Brushes/PatternBrush.cs index 9fafd4ed5f..c9e4d5bc7f 100644 --- a/src/ImageSharp/Drawing/Brushes/PatternBrush.cs +++ b/src/ImageSharp/Drawing/Brushes/PatternBrush.cs @@ -14,6 +14,32 @@ namespace ImageSharp.Drawing.Brushes /// /// Provides an implementaion of a pattern brush for painting patterns. /// + /// + /// The patterns that are used to create a custom pattern brush are made up of a repeating matrix of flags, + /// where each flag denotes weather to draw the foregound color or the background color. + /// so to create a new bool[,] with your flags + /// + /// For example if you wated to create a diagonal line that repeat every 4 pixels you would use a pattern like so + /// 1000 + /// 0100 + /// 0010 + /// 0001 + /// + /// or you want a horrizontal stripe which is 3 pixels apart you would use a pattern like + /// 1 + /// 0 + /// 0 + /// + /// warning when use array initallzer across multiple lines the bools look inverted i.e. + /// new bool[,]{ + /// {true, false, false}, + /// {false,true, false} + /// } + /// would be + /// 10 + /// 01 + /// 00 + /// public class PatternBrush : PatternBrush { ///