5 references to GetNearestColor
System.Drawing.Common.Tests (3)
System\Drawing\GraphicsTests.cs (3)
1926
Assert.Equal(expected, graphics.
GetNearestColor
(color));
1937
Assert.Throws<InvalidOperationException>(() => graphics.
GetNearestColor
(Color.Red));
1952
AssertExtensions.Throws<ArgumentException>(null, () => graphics.
GetNearestColor
(Color.Red));
System.Windows.Forms.Primitives (2)
System\Windows\Forms\SystemDrawingExtensions.cs (2)
17
/// Similar to <see cref="Graphics.
GetNearestColor
(Color)"/>, but this retains the original color if the color
34
Color newColor = graphics.
GetNearestColor
(color);