146 references to ColorAdjustType
System.Drawing (1)
System.Drawing.cs (1)
70
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.
ColorAdjustType
))]
System.Drawing.Common (18)
Special\NotSupported.cs (18)
2406
public void ClearColorKey(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2408
public void ClearColorMatrix(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2410
public void ClearGamma(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2412
public void ClearNoOp(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2414
public void ClearOutputChannel(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2416
public void ClearOutputChannelColorProfile(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2418
public void ClearRemapTable(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2420
public void ClearThreshold(System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2424
public void GetAdjustedPalette(System.Drawing.Imaging.ColorPalette palette, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2427
public void SetColorKey(System.Drawing.Color colorLow, System.Drawing.Color colorHigh, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2430
public void SetColorMatrices(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrix? grayMatrix, System.Drawing.Imaging.ColorMatrixFlag mode, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2433
public void SetColorMatrix(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrixFlag mode, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2435
public void SetGamma(float gamma, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2437
public void SetNoOp(System.Drawing.Imaging.
ColorAdjustType
type) { 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); }
2441
public void SetOutputChannelColorProfile(string colorProfileFilename, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2443
public void SetRemapTable(System.Drawing.Imaging.ColorMap[] map, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2445
public void SetThreshold(float threshold, System.Drawing.Imaging.
ColorAdjustType
type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (122)
System\Drawing\Imaging\ImageAttributesTests.cs (122)
164
yield return new object[] {
ColorAdjustType
.Default };
165
yield return new object[] {
ColorAdjustType
.Bitmap };
170
public void SetColorMatrix_ColorMatrixDefaultFlagType_Success(
ColorAdjustType
type)
194
yield return new object[] {
ColorAdjustType
.Brush };
195
yield return new object[] {
ColorAdjustType
.Pen };
196
yield return new object[] {
ColorAdjustType
.Text };
201
public void SetColorMatrix_ColorMatrixDefaultFlagTypeI_Success(
ColorAdjustType
type)
224
imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
234
imageAttr.SetColorMatrix(null, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
239
yield return new object[] { (
ColorAdjustType
.Default - 1) };
240
yield return new object[] {
ColorAdjustType
.Count };
241
yield return new object[] {
ColorAdjustType
.Any };
242
yield return new object[] { (
ColorAdjustType
.Any + 1) };
247
public void SetColorMatrix_InvalidTypes_ThrowsInvalidEnumArgumentException(
ColorAdjustType
type)
268
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag,
ColorAdjustType
.Default));
288
yield return new object[] {
ColorAdjustType
.Default };
289
yield return new object[] {
ColorAdjustType
.Bitmap };
290
yield return new object[] {
ColorAdjustType
.Brush };
291
yield return new object[] {
ColorAdjustType
.Pen };
292
yield return new object[] {
ColorAdjustType
.Text };
297
public void ClearColorMatrix_DefaultFlagType_Success(
ColorAdjustType
type)
328
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(
ColorAdjustType
.Default));
333
public void ClearColorMatrix_InvalidTypes_ThrowsInvalidEnumArgumentException(
ColorAdjustType
type)
379
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 0, 100) };
380
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 100, 100) };
381
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 200, 255) };
382
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 0, 100) };
383
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 100, 100) };
384
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 200, 255) };
390
(ColorMatrixFlag flag,
ColorAdjustType
type, Color grayShade, Color expectedGrayShade)
406
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
407
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
408
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
409
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
410
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
411
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
412
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
413
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
414
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
419
public void SetColorMatrices_ColorMatrixGrayMatrixFlagsTypesI_Success(ColorMatrixFlag flag,
ColorAdjustType
type, Color grayShade)
442
imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
453
imageAttr.SetColorMatrices(null, _grayMatrix, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
455
imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, null, ColorMatrixFlag.AltGrays,
ColorAdjustType
.Default));
460
public void SetColorMatrices_InvalidTypes_ThrowsInvalidEnumArgumentException(
ColorAdjustType
type)
477
imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, flag,
ColorAdjustType
.Default));
494
public void SetThreshold_ThresholdType_Success(
ColorAdjustType
type)
507
public void SetThreshold_ThresholdTypeI_Success(
ColorAdjustType
type)
529
public void SetThreshold_InvalidType_ThrowsArgumentException(
ColorAdjustType
type)
550
public void ClearThreshold_ThresholdTypeI_Success(
ColorAdjustType
type)
568
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(
ColorAdjustType
.Default));
573
public void ClearThreshold_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
593
public void SetGamma_GammaType_Success(
ColorAdjustType
type)
606
public void SetGamma_GammaTypeI_Success(
ColorAdjustType
type)
624
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f,
ColorAdjustType
.Default));
629
public void SetGamma_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
637
public void ClearGamma_Type_Success(
ColorAdjustType
type)
656
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(
ColorAdjustType
.Default));
661
public void ClearGamma_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
683
public void SetNoOp_Type_Success(
ColorAdjustType
type)
704
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(
ColorAdjustType
.Default));
709
public void SetNoOp_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
733
public void ClearNoOp_Type_Success(
ColorAdjustType
type)
750
public void ClearNoOp_TypeI_Success(
ColorAdjustType
type)
772
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(
ColorAdjustType
.Default));
777
public void ClearNoOp_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
799
public void SetColorKey_Type_Success(
ColorAdjustType
type)
814
public void SetColorKey_TypeI_Success(
ColorAdjustType
type)
834
imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150),
ColorAdjustType
.Default));
839
public void SetColorKey_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
862
public void ClearColorKey_Type_Success(
ColorAdjustType
type)
882
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(
ColorAdjustType
.Default));
887
public void ClearColorKey_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
917
yield return new object[] { ColorChannelFlag.ColorChannelC,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) };
918
yield return new object[] { ColorChannelFlag.ColorChannelK,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) };
919
yield return new object[] { ColorChannelFlag.ColorChannelM,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) };
920
yield return new object[] { ColorChannelFlag.ColorChannelY,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) };
921
yield return new object[] { ColorChannelFlag.ColorChannelC,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 198, 198, 198) };
922
yield return new object[] { ColorChannelFlag.ColorChannelK,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 108, 108, 108) };
923
yield return new object[] { ColorChannelFlag.ColorChannelM,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 204, 204, 204) };
924
yield return new object[] { ColorChannelFlag.ColorChannelY,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 207, 207, 207) };
929
public void SetOutputChannel_FlagType_Success(ColorChannelFlag flag,
ColorAdjustType
type, Color actualColor, Color expectedColor)
943
yield return new object[] { ColorChannelFlag.ColorChannelC,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
944
yield return new object[] { ColorChannelFlag.ColorChannelK,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
945
yield return new object[] { ColorChannelFlag.ColorChannelM,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
946
yield return new object[] { ColorChannelFlag.ColorChannelY,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
947
yield return new object[] { ColorChannelFlag.ColorChannelC,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
948
yield return new object[] { ColorChannelFlag.ColorChannelK,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
949
yield return new object[] { ColorChannelFlag.ColorChannelM,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
950
yield return new object[] { ColorChannelFlag.ColorChannelY,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
951
yield return new object[] { ColorChannelFlag.ColorChannelC,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
952
yield return new object[] { ColorChannelFlag.ColorChannelK,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
953
yield return new object[] { ColorChannelFlag.ColorChannelM,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
954
yield return new object[] { ColorChannelFlag.ColorChannelY,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
959
public void SetOutputChannel_FlagTypeI_Success(ColorChannelFlag flag,
ColorAdjustType
type, Color color)
978
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY,
ColorAdjustType
.Default));
983
public void SetOutputChannel_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1004
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag,
ColorAdjustType
.Default));
1023
public void ClearOutputChannel_Type_Success(
ColorAdjustType
type)
1043
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(
ColorAdjustType
.Default));
1048
public void ClearOutputChannel_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1076
imageAttr.SetOutputChannelColorProfile(Helpers.GetTestColorProfilePath("RSWOP.icm"),
ColorAdjustType
.Default));
1084
Assert.Throws<ArgumentNullException>(() => imageAttr.SetOutputChannelColorProfile(null,
ColorAdjustType
.Default));
1092
Assert.Throws<ArgumentException>(() => imageAttr.SetOutputChannelColorProfile(string.Empty,
ColorAdjustType
.Default));
1100
Assert.Throws<ExternalException>(() => imageAttr.SetOutputChannelColorProfile("invalidPath",
ColorAdjustType
.Default));
1109
Assert.Throws<PathTooLongException>(() => imageAttr.SetOutputChannelColorProfile(fileNameTooLong,
ColorAdjustType
.Default));
1114
public void SetOutputChannelColorProfile_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1137
public void ClearOutputChannelColorProfile_Type_Success(
ColorAdjustType
type)
1158
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(
ColorAdjustType
.Default));
1163
public void ClearOutputChannelColorProfile_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1183
public void SetRemapTable_MapType_Success(
ColorAdjustType
type)
1196
public void SetRemapTable_MapTypeI_Success(
ColorAdjustType
type)
1214
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap,
ColorAdjustType
.Default));
1219
public void SetRemapTable_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1229
Assert.Throws<ArgumentNullException>(() => imageAttr.SetRemapTable(null,
ColorAdjustType
.Default));
1236
Assert.Throws<NullReferenceException>(() => imageAttr.SetRemapTable([null],
ColorAdjustType
.Default));
1243
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable([],
ColorAdjustType
.Default));
1261
public void ClearRemapTable_Type_Success(
ColorAdjustType
type)
1280
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(
ColorAdjustType
.Default));
1285
public void ClearRemapTable_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1309
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette,
ColorAdjustType
.Default));
1316
Assert.Throws<NullReferenceException>(() => imageAttr.GetAdjustedPalette(null,
ColorAdjustType
.Default));
1321
public void GetAdjustedPalette_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
System.Windows.Forms (4)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
1037
attr.SetRemapTable(
ColorAdjustType
.Bitmap, new ReadOnlySpan<(Color OldColor, Color NewColor)>(ref map));
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (1)
504
attrs.SetRemapTable(
ColorAdjustType
.Bitmap, map);
System\Windows\Forms\Rendering\ControlPaint.cs (2)
1462
attributes.SetRemapTable(
ColorAdjustType
.Bitmap, map);
1581
attributes.SetRemapTable(
ColorAdjustType
.Bitmap, new ReadOnlySpan<(Color OldColor, Color NewColor)>(ref map));
System.Windows.Forms.Design (1)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
132
attributes.SetRemapTable(
ColorAdjustType
.Bitmap, new ReadOnlySpan<(Color OldColor, Color NewColor)>(ref map));