7 types derived from Brush
System.Drawing.Common (5)
System\Drawing\Drawing2D\HatchBrush.cs (1)
6
public sealed unsafe class HatchBrush :
Brush
System\Drawing\Drawing2D\LinearGradientBrush.cs (1)
8
public sealed unsafe class LinearGradientBrush :
Brush
System\Drawing\Drawing2D\PathGradientBrush.cs (1)
11
public sealed unsafe class PathGradientBrush :
Brush
System\Drawing\SolidBrush.cs (1)
8
public sealed unsafe class SolidBrush :
Brush
, ISystemColorTracker
System\Drawing\TextureBrush.cs (1)
9
public sealed unsafe class TextureBrush :
Brush
System.Drawing.Common.Tests (2)
System\Drawing\BrushTests.cs (1)
27
private class SubBrush :
Brush
System\Drawing\PenTests.cs (1)
166
public class SubBrush :
Brush
369 references to Brush
PresentationUI (1)
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
664
Brush
brush = isSelected ? SystemBrushes.HighlightText : SystemBrushes.ControlText;
System.Drawing (1)
System.Drawing.cs (1)
7
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
Brush
))]
System.Drawing.Common (296)
System\Drawing\Brushes.cs (144)
149
public static
Brush
Transparent => GetBrush(s_transparentKey, Color.Transparent);
151
public static
Brush
AliceBlue => GetBrush(s_aliceBlueKey, Color.AliceBlue);
152
public static
Brush
AntiqueWhite => GetBrush(s_antiqueWhiteKey, Color.AntiqueWhite);
153
public static
Brush
Aqua => GetBrush(s_aquaKey, Color.Aqua);
154
public static
Brush
Aquamarine => GetBrush(s_aquamarineKey, Color.Aquamarine);
155
public static
Brush
Azure => GetBrush(s_azureKey, Color.Azure);
157
public static
Brush
Beige => GetBrush(s_beigeKey, Color.Beige);
158
public static
Brush
Bisque => GetBrush(s_bisqueKey, Color.Bisque);
159
public static
Brush
Black => GetBrush(s_blackKey, Color.Black);
160
public static
Brush
BlanchedAlmond => GetBrush(s_blanchedAlmondKey, Color.BlanchedAlmond);
161
public static
Brush
Blue => GetBrush(s_blueKey, Color.Blue);
162
public static
Brush
BlueViolet => GetBrush(s_blueVioletKey, Color.BlueViolet);
163
public static
Brush
Brown => GetBrush(s_brownKey, Color.Brown);
164
public static
Brush
BurlyWood => GetBrush(s_burlyWoodKey, Color.BurlyWood);
166
public static
Brush
CadetBlue => GetBrush(s_cadetBlueKey, Color.CadetBlue);
167
public static
Brush
Chartreuse => GetBrush(s_chartreuseKey, Color.Chartreuse);
168
public static
Brush
Chocolate => GetBrush(s_chocolateKey, Color.Chocolate);
169
public static
Brush
Coral => GetBrush(s_coralKey, Color.Coral);
170
public static
Brush
CornflowerBlue => GetBrush(s_cornflowerBlueKey, Color.CornflowerBlue);
171
public static
Brush
Cornsilk => GetBrush(s_cornsilkKey, Color.Cornsilk);
172
public static
Brush
Crimson => GetBrush(s_crimsonKey, Color.Crimson);
173
public static
Brush
Cyan => GetBrush(s_cyanKey, Color.Cyan);
175
public static
Brush
DarkBlue => GetBrush(s_darkBlueKey, Color.DarkBlue);
176
public static
Brush
DarkCyan => GetBrush(s_darkCyanKey, Color.DarkCyan);
177
public static
Brush
DarkGoldenrod => GetBrush(s_darkGoldenrodKey, Color.DarkGoldenrod);
178
public static
Brush
DarkGray => GetBrush(s_darkGrayKey, Color.DarkGray);
179
public static
Brush
DarkGreen => GetBrush(s_darkGreenKey, Color.DarkGreen);
180
public static
Brush
DarkKhaki => GetBrush(s_darkKhakiKey, Color.DarkKhaki);
181
public static
Brush
DarkMagenta => GetBrush(s_darkMagentaKey, Color.DarkMagenta);
182
public static
Brush
DarkOliveGreen => GetBrush(s_darkOliveGreenKey, Color.DarkOliveGreen);
183
public static
Brush
DarkOrange => GetBrush(s_darkOrangeKey, Color.DarkOrange);
184
public static
Brush
DarkOrchid => GetBrush(s_darkOrchidKey, Color.DarkOrchid);
185
public static
Brush
DarkRed => GetBrush(s_darkRedKey, Color.DarkRed);
186
public static
Brush
DarkSalmon => GetBrush(s_darkSalmonKey, Color.DarkSalmon);
187
public static
Brush
DarkSeaGreen => GetBrush(s_darkSeaGreenKey, Color.DarkSeaGreen);
188
public static
Brush
DarkSlateBlue => GetBrush(s_darkSlateBlueKey, Color.DarkSlateBlue);
189
public static
Brush
DarkSlateGray => GetBrush(s_darkSlateGrayKey, Color.DarkSlateGray);
190
public static
Brush
DarkTurquoise => GetBrush(s_darkTurquoiseKey, Color.DarkTurquoise);
191
public static
Brush
DarkViolet => GetBrush(s_darkVioletKey, Color.DarkViolet);
192
public static
Brush
DeepPink => GetBrush(s_deepPinkKey, Color.DeepPink);
193
public static
Brush
DeepSkyBlue => GetBrush(s_deepSkyBlueKey, Color.DeepSkyBlue);
194
public static
Brush
DimGray => GetBrush(s_dimGrayKey, Color.DimGray);
195
public static
Brush
DodgerBlue => GetBrush(s_dodgerBlueKey, Color.DodgerBlue);
197
public static
Brush
Firebrick => GetBrush(s_firebrickKey, Color.Firebrick);
198
public static
Brush
FloralWhite => GetBrush(s_floralWhiteKey, Color.FloralWhite);
199
public static
Brush
ForestGreen => GetBrush(s_forestGreenKey, Color.ForestGreen);
200
public static
Brush
Fuchsia => GetBrush(s_fuchsiaKey, Color.Fuchsia);
202
public static
Brush
Gainsboro => GetBrush(s_gainsboroKey, Color.Gainsboro);
203
public static
Brush
GhostWhite => GetBrush(s_ghostWhiteKey, Color.GhostWhite);
204
public static
Brush
Gold => GetBrush(s_goldKey, Color.Gold);
205
public static
Brush
Goldenrod => GetBrush(s_goldenrodKey, Color.Goldenrod);
206
public static
Brush
Gray => GetBrush(s_grayKey, Color.Gray);
207
public static
Brush
Green => GetBrush(s_greenKey, Color.Green);
208
public static
Brush
GreenYellow => GetBrush(s_greenYellowKey, Color.GreenYellow);
210
public static
Brush
Honeydew => GetBrush(s_honeydewKey, Color.Honeydew);
211
public static
Brush
HotPink => GetBrush(s_hotPinkKey, Color.HotPink);
213
public static
Brush
IndianRed => GetBrush(s_indianRedKey, Color.IndianRed);
214
public static
Brush
Indigo => GetBrush(s_indigoKey, Color.Indigo);
215
public static
Brush
Ivory => GetBrush(s_ivoryKey, Color.Ivory);
217
public static
Brush
Khaki => GetBrush(s_khakiKey, Color.Khaki);
219
public static
Brush
Lavender => GetBrush(s_lavenderKey, Color.Lavender);
220
public static
Brush
LavenderBlush => GetBrush(s_lavenderBlushKey, Color.LavenderBlush);
221
public static
Brush
LawnGreen => GetBrush(s_lawnGreenKey, Color.LawnGreen);
222
public static
Brush
LemonChiffon => GetBrush(s_lemonChiffonKey, Color.LemonChiffon);
223
public static
Brush
LightBlue => GetBrush(s_lightBlueKey, Color.LightBlue);
224
public static
Brush
LightCoral => GetBrush(s_lightCoralKey, Color.LightCoral);
225
public static
Brush
LightCyan => GetBrush(s_lightCyanKey, Color.LightCyan);
226
public static
Brush
LightGoldenrodYellow => GetBrush(s_lightGoldenrodYellowKey, Color.LightGoldenrodYellow);
227
public static
Brush
LightGreen => GetBrush(s_lightGreenKey, Color.LightGreen);
228
public static
Brush
LightGray => GetBrush(s_lightGrayKey, Color.LightGray);
229
public static
Brush
LightPink => GetBrush(s_lightPinkKey, Color.LightPink);
230
public static
Brush
LightSalmon => GetBrush(s_lightSalmonKey, Color.LightSalmon);
231
public static
Brush
LightSeaGreen => GetBrush(s_lightSeaGreenKey, Color.LightSeaGreen);
232
public static
Brush
LightSkyBlue => GetBrush(s_lightSkyBlueKey, Color.LightSkyBlue);
233
public static
Brush
LightSlateGray => GetBrush(s_lightSlateGrayKey, Color.LightSlateGray);
234
public static
Brush
LightSteelBlue => GetBrush(s_lightSteelBlueKey, Color.LightSteelBlue);
235
public static
Brush
LightYellow => GetBrush(s_lightYellowKey, Color.LightYellow);
236
public static
Brush
Lime => GetBrush(s_limeKey, Color.Lime);
237
public static
Brush
LimeGreen => GetBrush(s_limeGreenKey, Color.LimeGreen);
238
public static
Brush
Linen => GetBrush(s_linenKey, Color.Linen);
240
public static
Brush
Magenta => GetBrush(s_magentaKey, Color.Magenta);
241
public static
Brush
Maroon => GetBrush(s_maroonKey, Color.Maroon);
242
public static
Brush
MediumAquamarine => GetBrush(s_mediumAquamarineKey, Color.MediumAquamarine);
243
public static
Brush
MediumBlue => GetBrush(s_mediumBlueKey, Color.MediumBlue);
244
public static
Brush
MediumOrchid => GetBrush(s_mediumOrchidKey, Color.MediumOrchid);
245
public static
Brush
MediumPurple => GetBrush(s_mediumPurpleKey, Color.MediumPurple);
246
public static
Brush
MediumSeaGreen => GetBrush(s_mediumSeaGreenKey, Color.MediumSeaGreen);
247
public static
Brush
MediumSlateBlue => GetBrush(s_mediumSlateBlueKey, Color.MediumSlateBlue);
248
public static
Brush
MediumSpringGreen => GetBrush(s_mediumSpringGreenKey, Color.MediumSpringGreen);
249
public static
Brush
MediumTurquoise => GetBrush(s_mediumTurquoiseKey, Color.MediumTurquoise);
250
public static
Brush
MediumVioletRed => GetBrush(s_mediumVioletRedKey, Color.MediumVioletRed);
251
public static
Brush
MidnightBlue => GetBrush(s_midnightBlueKey, Color.MidnightBlue);
252
public static
Brush
MintCream => GetBrush(s_mintCreamKey, Color.MintCream);
253
public static
Brush
MistyRose => GetBrush(s_mistyRoseKey, Color.MistyRose);
254
public static
Brush
Moccasin => GetBrush(s_moccasinKey, Color.Moccasin);
256
public static
Brush
NavajoWhite => GetBrush(s_navajoWhiteKey, Color.NavajoWhite);
257
public static
Brush
Navy => GetBrush(s_navyKey, Color.Navy);
259
public static
Brush
OldLace => GetBrush(s_oldLaceKey, Color.OldLace);
260
public static
Brush
Olive => GetBrush(s_oliveKey, Color.Olive);
261
public static
Brush
OliveDrab => GetBrush(s_oliveDrabKey, Color.OliveDrab);
262
public static
Brush
Orange => GetBrush(s_orangeKey, Color.Orange);
263
public static
Brush
OrangeRed => GetBrush(s_orangeRedKey, Color.OrangeRed);
264
public static
Brush
Orchid => GetBrush(s_orchidKey, Color.Orchid);
266
public static
Brush
PaleGoldenrod => GetBrush(s_paleGoldenrodKey, Color.PaleGoldenrod);
267
public static
Brush
PaleGreen => GetBrush(s_paleGreenKey, Color.PaleGreen);
268
public static
Brush
PaleTurquoise => GetBrush(s_paleTurquoiseKey, Color.PaleTurquoise);
269
public static
Brush
PaleVioletRed => GetBrush(s_paleVioletRedKey, Color.PaleVioletRed);
270
public static
Brush
PapayaWhip => GetBrush(s_papayaWhipKey, Color.PapayaWhip);
271
public static
Brush
PeachPuff => GetBrush(s_peachPuffKey, Color.PeachPuff);
272
public static
Brush
Peru => GetBrush(s_peruKey, Color.Peru);
273
public static
Brush
Pink => GetBrush(s_pinkKey, Color.Pink);
274
public static
Brush
Plum => GetBrush(s_plumKey, Color.Plum);
275
public static
Brush
PowderBlue => GetBrush(s_powderBlueKey, Color.PowderBlue);
276
public static
Brush
Purple => GetBrush(s_purpleKey, Color.Purple);
278
public static
Brush
Red => GetBrush(s_redKey, Color.Red);
279
public static
Brush
RosyBrown => GetBrush(s_rosyBrownKey, Color.RosyBrown);
280
public static
Brush
RoyalBlue => GetBrush(s_royalBlueKey, Color.RoyalBlue);
282
public static
Brush
SaddleBrown => GetBrush(s_saddleBrownKey, Color.SaddleBrown);
283
public static
Brush
Salmon => GetBrush(s_salmonKey, Color.Salmon);
284
public static
Brush
SandyBrown => GetBrush(s_sandyBrownKey, Color.SandyBrown);
285
public static
Brush
SeaGreen => GetBrush(s_seaGreenKey, Color.SeaGreen);
286
public static
Brush
SeaShell => GetBrush(s_seaShellKey, Color.SeaShell);
287
public static
Brush
Sienna => GetBrush(s_siennaKey, Color.Sienna);
288
public static
Brush
Silver => GetBrush(s_silverKey, Color.Silver);
289
public static
Brush
SkyBlue => GetBrush(s_skyBlueKey, Color.SkyBlue);
290
public static
Brush
SlateBlue => GetBrush(s_slateBlueKey, Color.SlateBlue);
291
public static
Brush
SlateGray => GetBrush(s_slateGrayKey, Color.SlateGray);
292
public static
Brush
Snow => GetBrush(s_snowKey, Color.Snow);
293
public static
Brush
SpringGreen => GetBrush(s_springGreenKey, Color.SpringGreen);
294
public static
Brush
SteelBlue => GetBrush(s_steelBlueKey, Color.SteelBlue);
296
public static
Brush
Tan => GetBrush(s_tanKey, Color.Tan);
297
public static
Brush
Teal => GetBrush(s_tealKey, Color.Teal);
298
public static
Brush
Thistle => GetBrush(s_thistleKey, Color.Thistle);
299
public static
Brush
Tomato => GetBrush(s_tomatoKey, Color.Tomato);
300
public static
Brush
Turquoise => GetBrush(s_turquoiseKey, Color.Turquoise);
302
public static
Brush
Violet => GetBrush(s_violetKey, Color.Violet);
304
public static
Brush
Wheat => GetBrush(s_wheatKey, Color.Wheat);
305
public static
Brush
White => GetBrush(s_whiteKey, Color.White);
306
public static
Brush
WhiteSmoke => GetBrush(s_whiteSmokeKey, Color.WhiteSmoke);
308
public static
Brush
Yellow => GetBrush(s_yellowKey, Color.Yellow);
309
public static
Brush
YellowGreen => GetBrush(s_yellowGreenKey, Color.YellowGreen);
311
private static
Brush
GetBrush(object key, Color color)
313
if (Gdip.ThreadData.TryGetValue(key, out object? objectBrush) && objectBrush is
Brush
brush)
318
Brush
newBrush = new SolidBrush(color);
System\Drawing\Drawing2D\PathGradientBrush.cs (1)
9
/// Encapsulates a <see cref="
Brush
"/> object that fills the interior of a <see cref="GraphicsPath"/> object with a gradient.
System\Drawing\Graphics.cs (106)
1195
/// <inheritdoc cref="FillRoundedRectangle(
Brush
, RectangleF, SizeF)"/>
1196
public void FillRoundedRectangle(
Brush
brush, Rectangle rect, Size radius) =>
1200
/// Fills the interior of a rounded rectangle with a <see cref='
Brush
'/>.
1202
/// <param name="brush">The <see cref="
Brush
"/> to fill the rounded rectangle with.</param>
1205
public void FillRoundedRectangle(
Brush
brush, RectangleF rect, SizeF radius)
1214
/// Fills the interior of a rectangle with a <see cref='
Brush
'/>.
1216
public void FillRectangle(
Brush
brush, RectangleF rect) => FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height);
1219
/// Fills the interior of a rectangle with a <see cref='
Brush
'/>.
1221
public void FillRectangle(
Brush
brush, float x, float y, float width, float height)
1234
/// Fills the interior of a rectangle with a <see cref='
Brush
'/>.
1236
public void FillRectangle(
Brush
brush, Rectangle rect) => FillRectangle(brush, (float)rect.X, rect.Y, rect.Width, rect.Height);
1239
/// Fills the interior of a rectangle with a <see cref='
Brush
'/>.
1241
public void FillRectangle(
Brush
brush, int x, int y, int width, int height) => FillRectangle(brush, (float)x, y, width, height);
1244
/// Fills the interiors of a series of rectangles with a <see cref='
Brush
'/>.
1246
/// <param name="brush">The <see cref="
Brush
"/> to fill the rectangles with.</param>
1248
public void FillRectangles(
Brush
brush, params RectangleF[] rects)
1254
/// <inheritdoc cref="FillRectangles(
Brush
, RectangleF[])"/>
1260
void FillRectangles(
Brush
brush, params ReadOnlySpan<RectangleF> rects)
1272
/// <inheritdoc cref="FillRectangles(
Brush
, RectangleF[])"/>
1273
public void FillRectangles(
Brush
brush, params Rectangle[] rects) =>
1276
/// <inheritdoc cref="FillRectangles(
Brush
, RectangleF[])"/>
1282
void FillRectangles(
Brush
brush, params ReadOnlySpan<Rectangle> rects)
1294
/// <inheritdoc cref="FillPolygon(
Brush
, Point[], FillMode)"/>
1295
public void FillPolygon(
Brush
brush, params PointF[] points) => FillPolygon(brush, points, FillMode.Alternate);
1298
/// <inheritdoc cref="FillPolygon(
Brush
, Point[], FillMode)"/>
1299
public void FillPolygon(
Brush
brush, params ReadOnlySpan<PointF> points) => FillPolygon(brush, points, FillMode.Alternate);
1302
/// <inheritdoc cref="FillPolygon(
Brush
, Point[], FillMode)"/>
1303
public void FillPolygon(
Brush
brush, PointF[] points, FillMode fillMode) =>
1306
/// <inheritdoc cref="FillPolygon(
Brush
, Point[], FillMode)"/>
1312
void FillPolygon(
Brush
brush, ReadOnlySpan<PointF> points, FillMode fillMode)
1328
/// <inheritdoc cref="FillPolygon(
Brush
, Point[], FillMode)"/>
1329
public void FillPolygon(
Brush
brush, Point[] points) => FillPolygon(brush, points, FillMode.Alternate);
1332
/// <inheritdoc cref="FillPolygon(
Brush
, Point[], FillMode)"/>
1333
public void FillPolygon(
Brush
brush, params ReadOnlySpan<Point> points) => FillPolygon(brush, points, FillMode.Alternate);
1339
/// <param name="brush">The <see cref="
Brush
"/> to fill the polygon with.</param>
1342
public void FillPolygon(
Brush
brush, Point[] points, FillMode fillMode) =>
1345
/// <inheritdoc cref="FillPolygon(
Brush
, Point[], FillMode)"/>
1351
void FillPolygon(
Brush
brush, ReadOnlySpan<Point> points, FillMode fillMode)
1370
public void FillEllipse(
Brush
brush, RectangleF rect) => FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height);
1375
public void FillEllipse(
Brush
brush, float x, float y, float width, float height)
1390
public void FillEllipse(
Brush
brush, Rectangle rect) => FillEllipse(brush, (float)rect.X, rect.Y, rect.Width, rect.Height);
1395
public void FillEllipse(
Brush
brush, int x, int y, int width, int height) => FillEllipse(brush, (float)x, y, width, height);
1400
public void FillPie(
Brush
brush, Rectangle rect, float startAngle, float sweepAngle) =>
1418
public void FillPie(
Brush
brush, RectangleF rect, float startAngle, float sweepAngle) =>
1424
public void FillPie(
Brush
brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
1441
public void FillPie(
Brush
brush, int x, int y, int width, int height, int startAngle, int sweepAngle)
1444
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1445
public void FillClosedCurve(
Brush
brush, params PointF[] points) =>
1448
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1454
void FillClosedCurve(
Brush
brush, params ReadOnlySpan<PointF> points)
1469
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1470
public void FillClosedCurve(
Brush
brush, PointF[] points, FillMode fillmode) =>
1474
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1475
public void FillClosedCurve(
Brush
brush, ReadOnlySpan<PointF> points, FillMode fillmode) =>
1482
/// <param name="brush">The <see cref="
Brush
"/> to fill the closed curve with.</param>
1486
public void FillClosedCurve(
Brush
brush, PointF[] points, FillMode fillmode, float tension) =>
1489
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1495
void FillClosedCurve(
Brush
brush, ReadOnlySpan<PointF> points, FillMode fillmode, float tension)
1512
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1513
public void FillClosedCurve(
Brush
brush, params Point[] points) =>
1516
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1522
void FillClosedCurve(
Brush
brush, params ReadOnlySpan<Point> points)
1537
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1538
public void FillClosedCurve(
Brush
brush, Point[] points, FillMode fillmode) =>
1542
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1543
public void FillClosedCurve(
Brush
brush, ReadOnlySpan<Point> points, FillMode fillmode) =>
1548
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1549
public void FillClosedCurve(
Brush
brush, Point[] points, FillMode fillmode, float tension) =>
1552
/// <inheritdoc cref="FillClosedCurve(
Brush
, PointF[], FillMode, float)"/>
1558
void FillClosedCurve(
Brush
brush, ReadOnlySpan<Point> points, FillMode fillmode, float tension)
1576
/// Draws the specified text at the specified location with the specified <see cref="
Brush
"/> and
1581
/// <param name="brush"><see cref="
Brush
"/> that determines the color and texture of the drawn text.</param>
1587
public void DrawString(string? s, Font font,
Brush
brush, float x, float y) =>
1591
/// <inheritdoc cref="DrawString(string?, Font,
Brush
, float, float)"/>
1592
public void DrawString(ReadOnlySpan<char> s, Font font,
Brush
brush, float x, float y) =>
1597
/// Draws the specified text at the specified location with the specified <see cref="
Brush
"/> and
1602
/// <param name="brush"><see cref="
Brush
"/> that determines the color and texture of the drawn text.</param>
1607
public void DrawString(string? s, Font font,
Brush
brush, PointF point) =>
1611
/// <inheritdoc cref="DrawString(string?, Font,
Brush
, PointF)"/>
1612
public void DrawString(ReadOnlySpan<char> s, Font font,
Brush
brush, PointF point) =>
1617
/// Draws the specified text at the specified location with the specified <see cref="
Brush
"/> and
1622
/// <param name="brush"><see cref="
Brush
"/> that determines the color and texture of the drawn text.</param>
1632
public void DrawString(string? s, Font font,
Brush
brush, float x, float y, StringFormat? format) =>
1636
/// <inheritdoc cref="DrawString(string?, Font,
Brush
, float, float, StringFormat?)"/>
1637
public void DrawString(ReadOnlySpan<char> s, Font font,
Brush
brush, float x, float y, StringFormat? format) =>
1642
/// Draws the specified text at the specified location with the specified <see cref="
Brush
"/> and
1647
/// <param name="brush"><see cref="
Brush
"/> that determines the color and texture of the drawn text.</param>
1656
public void DrawString(string? s, Font font,
Brush
brush, PointF point, StringFormat? format) =>
1660
/// <inheritdoc cref="DrawString(string?, Font,
Brush
, PointF, StringFormat?)"/>
1661
public void DrawString(ReadOnlySpan<char> s, Font font,
Brush
brush, PointF point, StringFormat? format) =>
1666
/// Draws the specified text in the specified rectangle with the specified <see cref="
Brush
"/> and
1671
/// <param name="brush"><see cref="
Brush
"/> that determines the color and texture of the drawn text.</param>
1681
/// <see cref="DrawString(string?, Font,
Brush
, RectangleF, StringFormat?)"/> overload that takes
1685
public void DrawString(string? s, Font font,
Brush
brush, RectangleF layoutRectangle) =>
1694
/// <see cref="DrawString(ReadOnlySpan{char}, Font,
Brush
, RectangleF, StringFormat?)"/> overload that takes
1698
/// <inheritdoc cref="DrawString(string?, Font,
Brush
, RectangleF)"/>
1699
public void DrawString(ReadOnlySpan<char> s, Font font,
Brush
brush, RectangleF layoutRectangle) =>
1704
/// Draws the specified text in the specified rectangle with the specified <see cref="
Brush
"/> and
1709
/// <param name="brush"><see cref="
Brush
"/> that determines the color and texture of the drawn text.</param>
1725
public void DrawString(string? s, Font font,
Brush
brush, RectangleF layoutRectangle, StringFormat? format) =>
1729
/// <inheritdoc cref="DrawString(string?, Font,
Brush
, RectangleF, StringFormat?)"/>
1730
public void DrawString(ReadOnlySpan<char> s, Font font,
Brush
brush, RectangleF layoutRectangle, StringFormat? format) =>
1734
private void DrawStringInternal(ReadOnlySpan<char> s, Font font,
Brush
brush, RectangleF layoutRectangle, StringFormat? format)
1875
/// the <see cref="DrawString(string?, Font,
Brush
, PointF)"/> method adjusts glyph points to optimize display
2848
public void FillPath(
Brush
brush, GraphicsPath path)
2865
public void FillRegion(
Brush
brush, Region region)
System\Drawing\Imaging\ColorAdjustType.cs (1)
23
/// Defines color adjustment information for <see cref='Drawing.
Brush
'/> objects.
System\Drawing\Imaging\ColorMapType.cs (1)
16
/// Specifies a color map for a <see cref='Drawing.
Brush
'/>.
System\Drawing\Pen.cs (6)
60
public Pen(
Brush
brush) : this(brush, (float)1.0)
65
/// Initializes a new instance of the <see cref='Pen'/> class with the specified <see cref='Drawing.
Brush
'/> and width.
67
public Pen(
Brush
brush, float width)
590
/// Gets or sets the <see cref='Drawing.
Brush
'/> that determines attributes of this <see cref='Pen'/>.
592
public
Brush
Brush
596
Brush
? brush = null;
System\Drawing\PointerExtensions.cs (1)
23
public static GpBrush* Pointer(this
Brush
? brush) => brush is null ? null : brush.NativeBrush;
System\Drawing\SystemBrushes.cs (36)
10
public static
Brush
ActiveBorder => FromSystemColor(SystemColors.ActiveBorder);
11
public static
Brush
ActiveCaption => FromSystemColor(SystemColors.ActiveCaption);
12
public static
Brush
ActiveCaptionText => FromSystemColor(SystemColors.ActiveCaptionText);
13
public static
Brush
AppWorkspace => FromSystemColor(SystemColors.AppWorkspace);
15
public static
Brush
ButtonFace => FromSystemColor(SystemColors.ButtonFace);
16
public static
Brush
ButtonHighlight => FromSystemColor(SystemColors.ButtonHighlight);
17
public static
Brush
ButtonShadow => FromSystemColor(SystemColors.ButtonShadow);
19
public static
Brush
Control => FromSystemColor(SystemColors.Control);
20
public static
Brush
ControlLightLight => FromSystemColor(SystemColors.ControlLightLight);
21
public static
Brush
ControlLight => FromSystemColor(SystemColors.ControlLight);
22
public static
Brush
ControlDark => FromSystemColor(SystemColors.ControlDark);
23
public static
Brush
ControlDarkDark => FromSystemColor(SystemColors.ControlDarkDark);
24
public static
Brush
ControlText => FromSystemColor(SystemColors.ControlText);
26
public static
Brush
Desktop => FromSystemColor(SystemColors.Desktop);
28
public static
Brush
GradientActiveCaption => FromSystemColor(SystemColors.GradientActiveCaption);
29
public static
Brush
GradientInactiveCaption => FromSystemColor(SystemColors.GradientInactiveCaption);
30
public static
Brush
GrayText => FromSystemColor(SystemColors.GrayText);
32
public static
Brush
Highlight => FromSystemColor(SystemColors.Highlight);
33
public static
Brush
HighlightText => FromSystemColor(SystemColors.HighlightText);
34
public static
Brush
HotTrack => FromSystemColor(SystemColors.HotTrack);
36
public static
Brush
InactiveCaption => FromSystemColor(SystemColors.InactiveCaption);
37
public static
Brush
InactiveBorder => FromSystemColor(SystemColors.InactiveBorder);
38
public static
Brush
InactiveCaptionText => FromSystemColor(SystemColors.InactiveCaptionText);
39
public static
Brush
Info => FromSystemColor(SystemColors.Info);
40
public static
Brush
InfoText => FromSystemColor(SystemColors.InfoText);
42
public static
Brush
Menu => FromSystemColor(SystemColors.Menu);
43
public static
Brush
MenuBar => FromSystemColor(SystemColors.MenuBar);
44
public static
Brush
MenuHighlight => FromSystemColor(SystemColors.MenuHighlight);
45
public static
Brush
MenuText => FromSystemColor(SystemColors.MenuText);
47
public static
Brush
ScrollBar => FromSystemColor(SystemColors.ScrollBar);
49
public static
Brush
Window => FromSystemColor(SystemColors.Window);
50
public static
Brush
WindowFrame => FromSystemColor(SystemColors.WindowFrame);
51
public static
Brush
WindowText => FromSystemColor(SystemColors.WindowText);
53
public static
Brush
FromSystemColor(Color c)
60
if (!Gdip.ThreadData.TryGetValue(s_systemBrushesKey, out object? tempSystemBrushes) || tempSystemBrushes is not
Brush
[] systemBrushes)
62
systemBrushes = new
Brush
[(int)KnownColor.WindowText + (int)KnownColor.MenuHighlight - (int)KnownColor.YellowGreen];
System.Drawing.Common.Tests (9)
System\Drawing\BrushesTests.cs (2)
153
public static object[] Brush(Func<
Brush
> getBrush, Color expectedColor) => [getBrush, expectedColor];
157
public void Brushes_Get_ReturnsExpected(Func<
Brush
> getBrush, Color expectedColor)
System\Drawing\PenTests.cs (5)
22
public void Ctor_Brush<T>(T brush, PenType penType) where T :
Brush
55
public void Ctor_Brush_Width<T>(T brush, float width, PenType expectedPenType) where T :
Brush
151
public void Brush_SetValid_GetReturnsExpected<T>(T brush, PenType penType) where T :
Brush
265
public void Color_Set_GetReturnsExpected(
Brush
brush, PenType penType)
1200
private static void VerifyPen<T>(Pen pen, PenType expectedPenType, float expectedWidth) where T :
Brush
System\Drawing\SystemBrushesTests.cs (2)
45
public static object[] Brush(Func<
Brush
> getBrush, Color expectedColor) => [getBrush, expectedColor];
49
public void SystemBrushes_Get_ReturnsExpected(Func<
Brush
> getBrush, Color expectedColor)
System.Windows.Forms (40)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (3)
73
internal static
Brush
CreateDitherBrush(Color color1, Color color2)
99
using
Brush
brush = CreateDitherBrush(color1, color2);
514
internal void PaintButtonBackground(PaintEventArgs e, Rectangle bounds,
Brush
? background)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (2)
22
using
Brush
backgroundBrush = CreateDitherBrush(colors.Highlight, colors.ButtonFace);
68
using
Brush
backgroundBrush = CreateDitherBrush(colors.Highlight, colors.ButtonFace);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
129
Brush
? backgroundBrush = null;
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
146
Brush
brush = (comboBox.Enabled) ? SystemBrushes.ControlText : SystemBrushes.ControlDark;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3594
Brush
br,
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (4)
90
using
Brush
b = new LinearGradientBrush(
107
using
Brush
b = new LinearGradientBrush(
118
using
Brush
b = new LinearGradientBrush(
128
Brush
brush;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (9)
576
using
Brush
b = new LinearGradientBrush(
633
using
Brush
b = new LinearGradientBrush(
993
using (
Brush
b = new LinearGradientBrush(beginGradient, beginColor, middleColor, mode))
1018
using
Brush
b = new LinearGradientBrush(bounds, beginColor, endColor, mode);
1087
using
Brush
b = new LinearGradientBrush(
1413
using
Brush
b = new LinearGradientBrush(
1437
using
Brush
b = new LinearGradientBrush(
1549
using
Brush
b = new LinearGradientBrush(
1646
private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction,
Brush
brush)
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridColumnStyle.cs (2)
209
Brush
backBrush,
210
Brush
foreBrush,
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTextBoxColumn.cs (2)
74
Brush
backBrush,
75
Brush
foreBrush,
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
614
private void DrawPages(Graphics g, Rectangle rect, PreviewPageInfo[] pages,
Brush
backBrush)
System\Windows\Forms\Rendering\ControlPaint.cs (14)
35
private static
Brush
? s_grabBrushPrimary; // brush used for primary grab handles
36
private static
Brush
? s_grabBrushSecondary; // brush used for secondary grab handles
39
private static
Brush
? t_frameBrushActive; // brush used for the active selection frame
44
private static
Brush
? t_frameBrushSelected; // brush used for the inactive selection frame
49
private static
Brush
? t_gridBrush; // brush used to draw a grid
1274
Brush
brush = Brushes.White;
1320
Brush
background = ((state & ButtonState.Inactive) == ButtonState.Inactive)
1338
Brush
background,
1487
Brush
brush = primary
1872
Brush
frameBrush = active ? GetActiveBrush(backColor) : GetSelectedBrush(backColor);
2076
private static
Brush
GetActiveBrush(Color backColor)
2184
using (
Brush
brush = new TextureBrush(b))
2194
using (
Brush
brush = new TextureBrush(b))
2206
private static
Brush
GetSelectedBrush(Color backColor)
System.Windows.Forms.Design (18)
System\ComponentModel\Design\ByteViewer.cs (3)
140
using (
Brush
brush = new SolidBrush(SystemColors.ControlLightLight))
195
using
Brush
foreground = new SolidBrush(ForeColor);
223
using
Brush
foreground = new SolidBrush(ForeColor);
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
614
using (
Brush
textBrush = new SolidBrush(textColor))
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
387
private
Brush
WatermarkBrush
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
277
Brush
foreBrush = new SolidBrush(die.ForeColor);
System\Windows\Forms\Design\ComponentTray.cs (1)
2280
Brush
foreBrush = new SolidBrush(ForeColor);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
995
Brush
selectedBrush = new SolidBrush(e.BackColor);
996
Brush
foreBrush = new SolidBrush(e.ForeColor);
997
Brush
backBrush = new SolidBrush(_selectedColumns.BackColor);
System\Windows\Forms\Design\DesignerUtils.cs (3)
133
public static
Brush
HoverBrush => s_hoverBrush;
214
Brush
brush = SystemBrushes.ControlDarkDark;
234
Brush
brush = style switch
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (1)
145
Brush
brush = new SolidBrush(borderColor);
System\Windows\Forms\Design\TabOrder.cs (3)
29
private readonly
Brush
_highlightTextBrush;
263
Brush
brush;
288
Brush
foreBrush = new SolidBrush(textColor);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
467
using
Brush
brush = new SolidBrush(Color.FromArgb(50, Color.White));
System.Windows.Forms.Primitives (2)
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (1)
82
private static
Brush
? BrushFromKnownColor(KnownColor color) => color switch
System\Windows\Forms\SystemDrawingExtensions.cs (1)
112
internal static Pen CreateStaticPen(this
Brush
brush, float width = 1.0f)
TestPassApp (1)
PrintingControls.cs (1)
23
Brush
brush = Brushes.Blue;
WinFormsControlsTest (1)
ListBoxes.cs (1)
36
Brush
customBrush;