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