/// <summary> /// Creates a new instance of the <see cref="ToneCurve"/> class from the given floating point values. /// </summary> /// <param name="context">A <see cref="Context"/>, or null for the global context.</param> /// <param name="values">An array of floating point values.</param> /// <returns>A new <see cref="ToneCurve"/> instance.</returns> /// <exception cref="LcmsNETException"> /// Failed to create instance. /// </exception> /// <remarks> /// Creates the instance in the global context if <paramref name="context"/> is null. /// </remarks> public static ToneCurve BuildTabulated(Context context, float[] values) { return(new ToneCurve(Interop.BuildTabulatedToneCurve(context?.Handle ?? IntPtr.Zero, values), context)); }