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)
163
yield return new object[] {
ColorAdjustType
.Default };
164
yield return new object[] {
ColorAdjustType
.Bitmap };
169
public void SetColorMatrix_ColorMatrixDefaultFlagType_Success(
ColorAdjustType
type)
193
yield return new object[] {
ColorAdjustType
.Brush };
194
yield return new object[] {
ColorAdjustType
.Pen };
195
yield return new object[] {
ColorAdjustType
.Text };
200
public void SetColorMatrix_ColorMatrixDefaultFlagTypeI_Success(
ColorAdjustType
type)
223
imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
233
imageAttr.SetColorMatrix(null, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
238
yield return new object[] { (
ColorAdjustType
.Default - 1) };
239
yield return new object[] {
ColorAdjustType
.Count };
240
yield return new object[] {
ColorAdjustType
.Any };
241
yield return new object[] { (
ColorAdjustType
.Any + 1) };
246
public void SetColorMatrix_InvalidTypes_ThrowsInvalidEnumArgumentException(
ColorAdjustType
type)
267
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag,
ColorAdjustType
.Default));
287
yield return new object[] {
ColorAdjustType
.Default };
288
yield return new object[] {
ColorAdjustType
.Bitmap };
289
yield return new object[] {
ColorAdjustType
.Brush };
290
yield return new object[] {
ColorAdjustType
.Pen };
291
yield return new object[] {
ColorAdjustType
.Text };
296
public void ClearColorMatrix_DefaultFlagType_Success(
ColorAdjustType
type)
327
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(
ColorAdjustType
.Default));
332
public void ClearColorMatrix_InvalidTypes_ThrowsInvalidEnumArgumentException(
ColorAdjustType
type)
378
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 0, 100) };
379
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 100, 100) };
380
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Default, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 200, 255) };
381
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 0, 100) };
382
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 100, 100) };
383
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Bitmap, Color.FromArgb(255, 100, 100, 100), Color.FromArgb(255, 100, 200, 255) };
389
(ColorMatrixFlag flag,
ColorAdjustType
type, Color grayShade, Color expectedGrayShade)
405
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
406
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
407
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Pen, Color.FromArgb(255, 100, 100, 100) };
408
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
409
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
410
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Brush, Color.FromArgb(255, 100, 100, 100) };
411
yield return new object[] { ColorMatrixFlag.Default,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
412
yield return new object[] { ColorMatrixFlag.SkipGrays,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
413
yield return new object[] { ColorMatrixFlag.AltGrays,
ColorAdjustType
.Text, Color.FromArgb(255, 100, 100, 100) };
418
public void SetColorMatrices_ColorMatrixGrayMatrixFlagsTypesI_Success(ColorMatrixFlag flag,
ColorAdjustType
type, Color grayShade)
441
imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
452
imageAttr.SetColorMatrices(null, _grayMatrix, ColorMatrixFlag.Default,
ColorAdjustType
.Default));
454
imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, null, ColorMatrixFlag.AltGrays,
ColorAdjustType
.Default));
459
public void SetColorMatrices_InvalidTypes_ThrowsInvalidEnumArgumentException(
ColorAdjustType
type)
476
imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, flag,
ColorAdjustType
.Default));
493
public void SetThreshold_ThresholdType_Success(
ColorAdjustType
type)
506
public void SetThreshold_ThresholdTypeI_Success(
ColorAdjustType
type)
528
public void SetThreshold_InvalidType_ThrowsArgumentException(
ColorAdjustType
type)
549
public void ClearThreshold_ThresholdTypeI_Success(
ColorAdjustType
type)
567
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(
ColorAdjustType
.Default));
572
public void ClearThreshold_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
592
public void SetGamma_GammaType_Success(
ColorAdjustType
type)
605
public void SetGamma_GammaTypeI_Success(
ColorAdjustType
type)
623
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f,
ColorAdjustType
.Default));
628
public void SetGamma_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
636
public void ClearGamma_Type_Success(
ColorAdjustType
type)
655
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(
ColorAdjustType
.Default));
660
public void ClearGamma_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
682
public void SetNoOp_Type_Success(
ColorAdjustType
type)
703
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(
ColorAdjustType
.Default));
708
public void SetNoOp_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
732
public void ClearNoOp_Type_Success(
ColorAdjustType
type)
749
public void ClearNoOp_TypeI_Success(
ColorAdjustType
type)
771
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(
ColorAdjustType
.Default));
776
public void ClearNoOp_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
798
public void SetColorKey_Type_Success(
ColorAdjustType
type)
813
public void SetColorKey_TypeI_Success(
ColorAdjustType
type)
833
imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150),
ColorAdjustType
.Default));
838
public void SetColorKey_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
861
public void ClearColorKey_Type_Success(
ColorAdjustType
type)
881
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(
ColorAdjustType
.Default));
886
public void ClearColorKey_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
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)
977
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY,
ColorAdjustType
.Default));
982
public void SetOutputChannel_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1003
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag,
ColorAdjustType
.Default));
1022
public void ClearOutputChannel_Type_Success(
ColorAdjustType
type)
1042
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(
ColorAdjustType
.Default));
1047
public void ClearOutputChannel_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1075
imageAttr.SetOutputChannelColorProfile(Helpers.GetTestColorProfilePath("RSWOP.icm"),
ColorAdjustType
.Default));
1083
Assert.Throws<ArgumentNullException>(() => imageAttr.SetOutputChannelColorProfile(null,
ColorAdjustType
.Default));
1091
Assert.Throws<ArgumentException>(() => imageAttr.SetOutputChannelColorProfile(string.Empty,
ColorAdjustType
.Default));
1099
Assert.Throws<OutOfMemoryException>(() => imageAttr.SetOutputChannelColorProfile("invalidPath",
ColorAdjustType
.Default));
1108
Assert.Throws<PathTooLongException>(() => imageAttr.SetOutputChannelColorProfile(fileNameTooLong,
ColorAdjustType
.Default));
1113
public void SetOutputChannelColorProfile_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1136
public void ClearOutputChannelColorProfile_Type_Success(
ColorAdjustType
type)
1157
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(
ColorAdjustType
.Default));
1162
public void ClearOutputChannelColorProfile_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1182
public void SetRemapTable_MapType_Success(
ColorAdjustType
type)
1195
public void SetRemapTable_MapTypeI_Success(
ColorAdjustType
type)
1213
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap,
ColorAdjustType
.Default));
1218
public void SetRemapTable_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1228
Assert.Throws<ArgumentNullException>(() => imageAttr.SetRemapTable(null,
ColorAdjustType
.Default));
1235
Assert.Throws<NullReferenceException>(() => imageAttr.SetRemapTable([null],
ColorAdjustType
.Default));
1242
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable([],
ColorAdjustType
.Default));
1260
public void ClearRemapTable_Type_Success(
ColorAdjustType
type)
1279
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(
ColorAdjustType
.Default));
1284
public void ClearRemapTable_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
1308
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette,
ColorAdjustType
.Default));
1315
Assert.Throws<NullReferenceException>(() => imageAttr.GetAdjustedPalette(null,
ColorAdjustType
.Default));
1320
public void GetAdjustedPalette_InvalidTypes_ThrowsArgumentException(
ColorAdjustType
type)
System.Windows.Forms (4)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
1033
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)
1466
attributes.SetRemapTable(
ColorAdjustType
.Bitmap, map);
1585
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));