/// <summary> /// Creates a new instance of the <see cref="ToneCurve"/> class for a gamma tone curve. /// </summary> /// <param name="context">A <see cref="Context"/>, or null for the global context.</param> /// <param name="gamma">The value of the gamma exponent.</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 BuildGamma(Context context, double gamma) { return(new ToneCurve(Interop.BuildGammaToneCurve(context?.Handle ?? IntPtr.Zero, gamma), context)); }