44 references to ColorChannelFlag
System.Drawing (1)
System.Drawing.cs (1)
71
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.
ColorChannelFlag
))]
System.Drawing.Common (2)
Special\NotSupported.cs (2)
2438
public void SetOutputChannel(System.Drawing.Imaging.
ColorChannelFlag
flags) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2439
public void SetOutputChannel(System.Drawing.Imaging.
ColorChannelFlag
flags, System.Drawing.Imaging.ColorAdjustType type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (41)
System\Drawing\Imaging\ImageAttributesTests.cs (41)
894
yield return new object[] {
ColorChannelFlag
.ColorChannelC, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) };
895
yield return new object[] {
ColorChannelFlag
.ColorChannelK, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) };
896
yield return new object[] {
ColorChannelFlag
.ColorChannelM, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) };
897
yield return new object[] {
ColorChannelFlag
.ColorChannelY, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) };
902
public void SetOutputChannel_Flag_Success(
ColorChannelFlag
flag, Color actualColor, Color expectedColor)
916
yield return new object[] {
ColorChannelFlag
.ColorChannelC, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) };
917
yield return new object[] {
ColorChannelFlag
.ColorChannelK, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) };
918
yield return new object[] {
ColorChannelFlag
.ColorChannelM, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) };
919
yield return new object[] {
ColorChannelFlag
.ColorChannelY, ColorAdjustType.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) };
920
yield return new object[] {
ColorChannelFlag
.ColorChannelC, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) };
921
yield return new object[] {
ColorChannelFlag
.ColorChannelK, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) };
922
yield return new object[] {
ColorChannelFlag
.ColorChannelM, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) };
923
yield return new object[] {
ColorChannelFlag
.ColorChannelY, ColorAdjustType.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) };
928
public void SetOutputChannel_FlagType_Success(
ColorChannelFlag
flag, ColorAdjustType type, Color actualColor, Color expectedColor)
942
yield return new object[] {
ColorChannelFlag
.ColorChannelC, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) };
943
yield return new object[] {
ColorChannelFlag
.ColorChannelK, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) };
944
yield return new object[] {
ColorChannelFlag
.ColorChannelM, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) };
945
yield return new object[] {
ColorChannelFlag
.ColorChannelY, ColorAdjustType.Brush, Color.FromArgb(255, 100, 100, 100) };
946
yield return new object[] {
ColorChannelFlag
.ColorChannelC, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) };
947
yield return new object[] {
ColorChannelFlag
.ColorChannelK, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) };
948
yield return new object[] {
ColorChannelFlag
.ColorChannelM, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) };
949
yield return new object[] {
ColorChannelFlag
.ColorChannelY, ColorAdjustType.Pen, Color.FromArgb(255, 100, 100, 100) };
950
yield return new object[] {
ColorChannelFlag
.ColorChannelC, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) };
951
yield return new object[] {
ColorChannelFlag
.ColorChannelK, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) };
952
yield return new object[] {
ColorChannelFlag
.ColorChannelM, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) };
953
yield return new object[] {
ColorChannelFlag
.ColorChannelY, ColorAdjustType.Text, Color.FromArgb(255, 100, 100, 100) };
958
public void SetOutputChannel_FlagTypeI_Success(
ColorChannelFlag
flag, ColorAdjustType type, Color color)
976
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelY));
977
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelY, ColorAdjustType.Default));
985
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelY, type));
990
yield return new object[] { (
ColorChannelFlag
)int.MinValue };
991
yield return new object[] {
ColorChannelFlag
.ColorChannelC - 1 };
992
yield return new object[] {
ColorChannelFlag
.ColorChannelLast };
993
yield return new object[] {
ColorChannelFlag
.ColorChannelLast + 1 };
994
yield return new object[] { (
ColorChannelFlag
)int.MaxValue };
999
public void SetOutputChannel_InvalidFlags_ThrowsArgumentException(
ColorChannelFlag
flag)
1012
imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelC);
1027
imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelC, type);
1059
imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelC);
1125
imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelC);
1141
imageAttr.SetOutputChannel(
ColorChannelFlag
.ColorChannelC, type);