@@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing
88 /// <summary>
99 /// A collection of methods for creating generic brushes.
1010 /// </summary>
11- /// <returns>A New <see cref="PatternBrush{TPixel} "/></returns>
11+ /// <returns>A New <see cref="PatternBrush"/></returns>
1212 public static class Brushes
1313 {
1414 /// <summary>
@@ -94,163 +94,131 @@ public static class Brushes
9494 /// Create as brush that will paint a solid color
9595 /// </summary>
9696 /// <param name="color">The color.</param>
97- /// <typeparam name="TPixel">The pixel format.</typeparam>
98- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
99- public static SolidBrush < TPixel > Solid < TPixel > ( TPixel color )
100- where TPixel : struct , IPixel < TPixel >
101- => new SolidBrush < TPixel > ( color ) ;
97+ /// <returns>A New <see cref="PatternBrush"/></returns>
98+ public static SolidBrush Solid ( Color color ) => new SolidBrush ( color ) ;
10299
103100 /// <summary>
104101 /// Create as brush that will paint a Percent10 Hatch Pattern with the specified colors
105102 /// </summary>
106103 /// <param name="foreColor">Color of the foreground.</param>
107- /// <typeparam name="TPixel">The pixel format.</typeparam>
108- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
109- public static PatternBrush < TPixel > Percent10 < TPixel > ( TPixel foreColor )
110- where TPixel : struct , IPixel < TPixel >
111- => new PatternBrush < TPixel > ( foreColor , NamedColors < TPixel > . Transparent , Percent10Pattern ) ;
104+ /// <returns>A New <see cref="PatternBrush"/></returns>
105+ public static PatternBrush Percent10 ( Color foreColor ) =>
106+ new PatternBrush ( foreColor , Color . Transparent , Percent10Pattern ) ;
112107
113108 /// <summary>
114109 /// Create as brush that will paint a Percent10 Hatch Pattern with the specified colors
115110 /// </summary>
116111 /// <param name="foreColor">Color of the foreground.</param>
117112 /// <param name="backColor">Color of the background.</param>
118- /// <typeparam name="TPixel">The pixel format.</typeparam>
119- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
120- public static PatternBrush < TPixel > Percent10 < TPixel > ( TPixel foreColor , TPixel backColor )
121- where TPixel : struct , IPixel < TPixel >
122- => new PatternBrush < TPixel > ( foreColor , backColor , Percent10Pattern ) ;
113+ /// <returns>A New <see cref="PatternBrush"/></returns>
114+ public static PatternBrush Percent10 ( Color foreColor , Color backColor ) =>
115+ new PatternBrush ( foreColor , backColor , Percent10Pattern ) ;
123116
124117 /// <summary>
125118 /// Create as brush that will paint a Percent20 Hatch Pattern with the specified foreground color and a
126119 /// transparent background.
127120 /// </summary>
128121 /// <param name="foreColor">Color of the foreground.</param>
129- /// <typeparam name="TPixel">The pixel format.</typeparam>
130- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
131- public static PatternBrush < TPixel > Percent20 < TPixel > ( TPixel foreColor )
132- where TPixel : struct , IPixel < TPixel >
133- => new PatternBrush < TPixel > ( foreColor , NamedColors < TPixel > . Transparent , Percent20Pattern ) ;
122+ /// <returns>A New <see cref="PatternBrush"/></returns>
123+ public static PatternBrush Percent20 ( Color foreColor ) =>
124+ new PatternBrush ( foreColor , Color . Transparent , Percent20Pattern ) ;
134125
135126 /// <summary>
136127 /// Create as brush that will paint a Percent20 Hatch Pattern with the specified colors
137128 /// </summary>
138129 /// <param name="foreColor">Color of the foreground.</param>
139130 /// <param name="backColor">Color of the background.</param>
140- /// <typeparam name="TPixel">The pixel format.</typeparam>
141- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
142- public static PatternBrush < TPixel > Percent20 < TPixel > ( TPixel foreColor , TPixel backColor )
143- where TPixel : struct , IPixel < TPixel >
144- => new PatternBrush < TPixel > ( foreColor , backColor , Percent20Pattern ) ;
131+ /// <returns>A New <see cref="PatternBrush"/></returns>
132+ public static PatternBrush Percent20 ( Color foreColor , Color backColor ) =>
133+ new PatternBrush ( foreColor , backColor , Percent20Pattern ) ;
145134
146135 /// <summary>
147136 /// Create as brush that will paint a Horizontal Hatch Pattern with the specified foreground color and a
148137 /// transparent background.
149138 /// </summary>
150139 /// <param name="foreColor">Color of the foreground.</param>
151- /// <typeparam name="TPixel">The pixel format.</typeparam>
152- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
153- public static PatternBrush < TPixel > Horizontal < TPixel > ( TPixel foreColor )
154- where TPixel : struct , IPixel < TPixel >
155- => new PatternBrush < TPixel > ( foreColor , NamedColors < TPixel > . Transparent , HorizontalPattern ) ;
140+ /// <returns>A New <see cref="PatternBrush"/></returns>
141+ public static PatternBrush Horizontal ( Color foreColor ) =>
142+ new PatternBrush ( foreColor , Color . Transparent , HorizontalPattern ) ;
156143
157144 /// <summary>
158145 /// Create as brush that will paint a Horizontal Hatch Pattern with the specified colors
159146 /// </summary>
160147 /// <param name="foreColor">Color of the foreground.</param>
161148 /// <param name="backColor">Color of the background.</param>
162- /// <typeparam name="TPixel">The pixel format.</typeparam>
163- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
164- public static PatternBrush < TPixel > Horizontal < TPixel > ( TPixel foreColor , TPixel backColor )
165- where TPixel : struct , IPixel < TPixel >
166- => new PatternBrush < TPixel > ( foreColor , backColor , HorizontalPattern ) ;
149+ /// <returns>A New <see cref="PatternBrush"/></returns>
150+ public static PatternBrush Horizontal ( Color foreColor , Color backColor ) =>
151+ new PatternBrush ( foreColor , backColor , HorizontalPattern ) ;
167152
168153 /// <summary>
169154 /// Create as brush that will paint a Min Hatch Pattern with the specified foreground color and a
170155 /// transparent background.
171156 /// </summary>
172157 /// <param name="foreColor">Color of the foreground.</param>
173- /// <typeparam name="TPixel">The pixel format.</typeparam>
174- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
175- public static PatternBrush < TPixel > Min < TPixel > ( TPixel foreColor )
176- where TPixel : struct , IPixel < TPixel >
177- => new PatternBrush < TPixel > ( foreColor , NamedColors < TPixel > . Transparent , MinPattern ) ;
158+ /// <returns>A New <see cref="PatternBrush"/></returns>
159+ public static PatternBrush Min ( Color foreColor ) => new PatternBrush ( foreColor , Color . Transparent , MinPattern ) ;
178160
179161 /// <summary>
180162 /// Create as brush that will paint a Min Hatch Pattern with the specified colors
181163 /// </summary>
182164 /// <param name="foreColor">Color of the foreground.</param>
183165 /// <param name="backColor">Color of the background.</param>
184- /// <typeparam name="TPixel">The pixel format.</typeparam>
185- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
186- public static PatternBrush < TPixel > Min < TPixel > ( TPixel foreColor , TPixel backColor )
187- where TPixel : struct , IPixel < TPixel >
188- => new PatternBrush < TPixel > ( foreColor , backColor , MinPattern ) ;
166+ /// <returns>A New <see cref="PatternBrush"/></returns>
167+ public static PatternBrush Min ( Color foreColor , Color backColor ) =>
168+ new PatternBrush ( foreColor , backColor , MinPattern ) ;
189169
190170 /// <summary>
191171 /// Create as brush that will paint a Vertical Hatch Pattern with the specified foreground color and a
192172 /// transparent background.
193173 /// </summary>
194174 /// <param name="foreColor">Color of the foreground.</param>
195- /// <typeparam name="TPixel">The pixel format.</typeparam>
196- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
197- public static PatternBrush < TPixel > Vertical < TPixel > ( TPixel foreColor )
198- where TPixel : struct , IPixel < TPixel >
199- => new PatternBrush < TPixel > ( foreColor , NamedColors < TPixel > . Transparent , VerticalPattern ) ;
175+ /// <returns>A New <see cref="PatternBrush"/></returns>
176+ public static PatternBrush Vertical ( Color foreColor ) =>
177+ new PatternBrush ( foreColor , Color . Transparent , VerticalPattern ) ;
200178
201179 /// <summary>
202180 /// Create as brush that will paint a Vertical Hatch Pattern with the specified colors
203181 /// </summary>
204182 /// <param name="foreColor">Color of the foreground.</param>
205183 /// <param name="backColor">Color of the background.</param>
206- /// <typeparam name="TPixel">The pixel format.</typeparam>
207- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
208- public static PatternBrush < TPixel > Vertical < TPixel > ( TPixel foreColor , TPixel backColor )
209- where TPixel : struct , IPixel < TPixel >
210- => new PatternBrush < TPixel > ( foreColor , backColor , VerticalPattern ) ;
184+ /// <returns>A New <see cref="PatternBrush"/></returns>
185+ public static PatternBrush Vertical ( Color foreColor , Color backColor ) =>
186+ new PatternBrush ( foreColor , backColor , VerticalPattern ) ;
211187
212188 /// <summary>
213189 /// Create as brush that will paint a Forward Diagonal Hatch Pattern with the specified foreground color and a
214190 /// transparent background.
215191 /// </summary>
216192 /// <param name="foreColor">Color of the foreground.</param>
217- /// <typeparam name="TPixel">The pixel format.</typeparam>
218- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
219- public static PatternBrush < TPixel > ForwardDiagonal < TPixel > ( TPixel foreColor )
220- where TPixel : struct , IPixel < TPixel >
221- => new PatternBrush < TPixel > ( foreColor , NamedColors < TPixel > . Transparent , ForwardDiagonalPattern ) ;
193+ /// <returns>A New <see cref="PatternBrush"/></returns>
194+ public static PatternBrush ForwardDiagonal ( Color foreColor ) =>
195+ new PatternBrush ( foreColor , Color . Transparent , ForwardDiagonalPattern ) ;
222196
223197 /// <summary>
224198 /// Create as brush that will paint a Forward Diagonal Hatch Pattern with the specified colors
225199 /// </summary>
226200 /// <param name="foreColor">Color of the foreground.</param>
227201 /// <param name="backColor">Color of the background.</param>
228- /// <typeparam name="TPixel">The pixel format.</typeparam>
229- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
230- public static PatternBrush < TPixel > ForwardDiagonal < TPixel > ( TPixel foreColor , TPixel backColor )
231- where TPixel : struct , IPixel < TPixel >
232- => new PatternBrush < TPixel > ( foreColor , backColor , ForwardDiagonalPattern ) ;
202+ /// <returns>A New <see cref="PatternBrush"/></returns>
203+ public static PatternBrush ForwardDiagonal ( Color foreColor , Color backColor ) =>
204+ new PatternBrush ( foreColor , backColor , ForwardDiagonalPattern ) ;
233205
234206 /// <summary>
235207 /// Create as brush that will paint a Backward Diagonal Hatch Pattern with the specified foreground color and a
236208 /// transparent background.
237209 /// </summary>
238210 /// <param name="foreColor">Color of the foreground.</param>
239- /// <typeparam name="TPixel">The pixel format.</typeparam>
240- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
241- public static PatternBrush < TPixel > BackwardDiagonal < TPixel > ( TPixel foreColor )
242- where TPixel : struct , IPixel < TPixel >
243- => new PatternBrush < TPixel > ( foreColor , NamedColors < TPixel > . Transparent , BackwardDiagonalPattern ) ;
211+ /// <returns>A New <see cref="PatternBrush"/></returns>
212+ public static PatternBrush BackwardDiagonal ( Color foreColor ) =>
213+ new PatternBrush ( foreColor , Color . Transparent , BackwardDiagonalPattern ) ;
244214
245215 /// <summary>
246216 /// Create as brush that will paint a Backward Diagonal Hatch Pattern with the specified colors
247217 /// </summary>
248218 /// <param name="foreColor">Color of the foreground.</param>
249219 /// <param name="backColor">Color of the background.</param>
250- /// <typeparam name="TPixel">The pixel format.</typeparam>
251- /// <returns>A New <see cref="PatternBrush{TPixel}"/></returns>
252- public static PatternBrush < TPixel > BackwardDiagonal < TPixel > ( TPixel foreColor , TPixel backColor )
253- where TPixel : struct , IPixel < TPixel >
254- => new PatternBrush < TPixel > ( foreColor , backColor , BackwardDiagonalPattern ) ;
220+ /// <returns>A New <see cref="PatternBrush"/></returns>
221+ public static PatternBrush BackwardDiagonal ( Color foreColor , Color backColor ) =>
222+ new PatternBrush ( foreColor , backColor , BackwardDiagonalPattern ) ;
255223 }
256224}
0 commit comments