本文整理汇总了C#中Curve.SetPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Curve.SetPoint方法的具体用法?C# Curve.SetPoint怎么用?C# Curve.SetPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curve
的用法示例。
在下文中一共展示了Curve.SetPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RetroBloomFilter
public RetroBloomFilter()
: base()
{
Name = "Bloom";
ShortDescription = "Bloom";
_levelFilter = new LevelsFilter(0.9, 0.6, 0.0);
_curvesFilter = new CurvesFilter();
Curve red = new Curve();
red.SetPoint(127, 100);
red.SetPoint(235, 255);
Curve green = new Curve();
green.SetPoint(97, 72);
green.SetPoint(177, 189);
Curve blue = new Curve();
blue.SetPoint(0, 34);
blue.SetPoint(255, 220);
_curvesFilter.Red = red;
_curvesFilter.Green = green;
_curvesFilter.Blue = blue;
_vignettingFilter = new VignettingFilter(0.5, new Windows.UI.Color { R = 104, G = 103, B = 71 });
//_vignettingFilter = new VignettingFilter(0.3, new Windows.UI.Color { R = 255, G = 0, B = 0 });
_hueSaturationFilter = new HueSaturationFilter(5.0 / 255.0, -40.0 / 255.0);
_colorAdjustFilter = new ColorAdjustFilter(45.0 / 255.0, -41.0 / 255.0, -89.0 / 255.0);
}
示例2: QuartzEffect
public QuartzEffect()
{
m_cachingEffect = new CachingEffect();
var curve = new Curve();
curve.SetPoint(16, 7);
curve.SetPoint(39, 24);
curve.SetPoint(208, 223);
curve.SetPoint(234, 247);
var positiveBrightnessCurve = new Curve(CurveInterpolation.Linear, new[]
{
new Point(48, 124),
new Point(64, 162),
new Point(80, 193),
new Point(96, 214),
new Point(112, 229),
new Point(128, 239),
new Point(144, 245),
new Point(160, 249),
new Point(192, 253),
new Point(240, 255)
});
var negativeBrightnessCurve = new Curve(CurveInterpolation.Linear, new[]
{
new Point(160, 63),
new Point(192, 79),
new Point(208, 90),
new Point(224, 106),
new Point(236, 123),
new Point(244, 141),
new Point(248, 156),
new Point(252, 183)
});
var brightnessCurve = Curve.Interpolate(new Curve(), positiveBrightnessCurve, 0.1, null);
var clarityList = new LayerList(
new AdjustmentLayer(LayerStyle.Normal(), m_cachingEffect),
new AdjustmentLayer(LayerStyle.Softlight(), new SDKTestApp_Native.HighpassEffect(100, true, 8))
);
LayerList.AddRange(
new AdjustmentLayer(LayerStyle.Normal(), new CurvesEffect(curve)),
new AdjustmentLayer(LayerStyle.Normal(), new CurvesEffect(brightnessCurve)),
// Clarity
new Layer(LayerStyle.Darken(), context => clarityList.ToImageProvider(context.BackgroundImage, context.HintedRenderSize)),
new AdjustmentLayer(LayerStyle.Normal(), new HueSaturationEffect(0, 0.65-1)),
new AdjustmentLayer(LayerStyle.Normal(), new VibranceEffect() { Level = 0.1 }),
new AdjustmentLayer(LayerStyle.Normal(), new SDKTestApp_Native.SplitToneEffect() { HighlightsSaturation = 42, HighlightsHue = 45 })
);
}
示例3: CreateCurveFromHueRangeAdjustments
public static Curve CreateCurveFromHueRangeAdjustments(params HueRangeAdjustment[] adjustments)
{
Curve curve = new Curve(CurveInterpolation.Linear);
curve.SetPoint(255, 0);
foreach (var adjustment in adjustments)
{
var adjustmentLevel = ConvertAdjustmentLevel(adjustment.Adjustment);
switch (adjustment.HueRange)
{
case 0:
curve = Curve.Add(curve, new Curve(CurveInterpolation.Linear)
{
Points = new[]
{
new Point(0, adjustmentLevel),
new Point(255, adjustmentLevel),
}
}, null);
break;
case 1:
curve = Curve.Add(curve, new Curve(CurveInterpolation.Linear)
{
Points = new[]
{
new Point(0, adjustmentLevel),
new Point(AngleToHue(15), adjustmentLevel),
new Point(AngleToHue(45), 0),
new Point(AngleToHue(315), 0),
new Point(AngleToHue(345), adjustmentLevel),
new Point(255, adjustmentLevel),
}
}, null);
break;
case 2:
curve = Curve.Add(curve, new Curve(CurveInterpolation.Linear)
{
Points = new[]
{
new Point(AngleToHue(15), 0),
new Point(AngleToHue(45), adjustmentLevel),
new Point(AngleToHue(75), adjustmentLevel),
new Point(AngleToHue(105), 0),
new Point(255, 0),
}
}, null);
break;
case 3:
curve = Curve.Add(curve, new Curve(CurveInterpolation.Linear)
{
Points = new[]
{
new Point(AngleToHue(75), 0),
new Point(AngleToHue(105), adjustmentLevel),
new Point(AngleToHue(135), adjustmentLevel),
new Point(AngleToHue(165), 0),
new Point(255, 0),
}
}, null);
break;
case 4:
curve = Curve.Add(curve, new Curve(CurveInterpolation.Linear)
{
Points = new[]
{
new Point(AngleToHue(135), 0),
new Point(AngleToHue(165), adjustmentLevel),
new Point(AngleToHue(195), adjustmentLevel),
new Point(AngleToHue(225), 0),
new Point(255, 0),
}
}, null);
break;
case 5:
curve = Curve.Add(curve, new Curve(CurveInterpolation.Linear)
{
Points = new[]
{
new Point(AngleToHue(195), 0),
new Point(AngleToHue(225), adjustmentLevel),
new Point(AngleToHue(255), adjustmentLevel),
new Point(AngleToHue(285), 0),
new Point(255, 0),
}
}, null);
break;
case 6:
curve = Curve.Add(curve, new Curve(CurveInterpolation.Linear)
{
Points = new[]
{
new Point(AngleToHue(255), 0),
new Point(AngleToHue(285), adjustmentLevel),
new Point(AngleToHue(315), adjustmentLevel),
new Point(AngleToHue(345), 0),
new Point(255, 0),
}
}, null);
break;
}
//.........这里部分代码省略.........