0

I am refencing a sample nokia project, and I would like to add the Curves filter. I am unsure of how to do this, as I do not understand what the Curve parameters are that are required by the filter

CurvesFilter(Curve red, curve Green, curve blue)

What do I need to insert into the parameters?

David Božjak
  • 16,887
  • 18
  • 67
  • 98
Matthew
  • 3,976
  • 15
  • 66
  • 130

1 Answers1

0

Just check documentation. It is described here: CurvesFilter

First constructor creates and initializes a new CurvesFilter with default values:

CurvesFilter()

Second constructor creates and initializes a new CurvesFilter with a set of color curves:

CurvesFilter(Curve, Curve, Curve)

So red, green and blue is type of Curve class. You can check documentation here: Curve

So you should create a new object of the class:

Curve(CurveInterpolation)

CurveInterpolation is the mode of interpolation between points.

Norbert Pisz
  • 3,392
  • 3
  • 27
  • 42
  • I see there is `CurveInterpolation.Linear` and `CurveInterpolation.NaturalCubicSpline` but how do I insert these into the `CurvesFilter`? – Matthew Jan 05 '14 at 10:46
  • CurveInterpolation is property so use "." notation. I don't have this SDK so I can't test.Try like var red = new Curve(CurveInterpolation.Linear); – Norbert Pisz Jan 05 '14 at 11:09
  • Don't forget to add some points to the Curve after creating it! – David Božjak Jan 05 '14 at 13:41
  • Could you give an example please? I've done `var red = new Curve(CurveInterpolation.Linear); red.SetPoint(0, 0);` but I'm not sure what to do with this? – Matthew Jan 05 '14 at 16:22
  • @Matthew After creating the curves, you create a curves filter, and you add that to your FilterEffect's Filters list. You then render your chain. – David Božjak Jan 28 '14 at 08:35