-
Notifications
You must be signed in to change notification settings - Fork 962
/
ShadowCurveEffect.cs
35 lines (31 loc) · 1.56 KB
/
ShadowCurveEffect.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#if NET9_0_OR_GREATER
namespace System.Drawing.Imaging.Effects;
/// <summary>
/// Increases or decreases the value of a color channel if that channel already has a value that is below half
/// intensity. You can use this effect to get more definition in the dark areas of an image without affecting
/// the light areas.
/// </summary>
public class ShadowCurveEffect : ColorCurveEffect
{
/// <summary>
/// Creates a new <see cref="ShadowCurveEffect"/> with the given <paramref name="shadow"/>.
/// </summary>
/// <param name="channel">The channel or channels that the effect is applied to.</param>
/// <param name="shadow">
/// A value in the range of -100 through 100. A value of 0 specifies no change. Positive values specify that the
/// dark areas are made lighter, and negative values specify that the dark areas are made darker.
/// </param>
/// <exception cref="ArgumentException"><paramref name="shadow"/> is less than -100 or greater than 100.</exception>
public ShadowCurveEffect(CurveChannel channel, int shadow)
: base(CurveAdjustments.AdjustShadow, channel, shadow)
{
}
/// <summary>
/// A value in the range of -100 through 100. A value of 0 specifies no change. Positive values specify that the
/// dark areas are made lighter, and negative values specify that the dark areas are made darker.
/// </summary>
public int Shadow => AdjustValue;
}
#endif