// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Text;
namespace SharpDX.Direct2D1.Effects
{
///
/// Built in GammaTransfer effect.
///
public class GammaTransfer : Effect
{
///
/// Initializes a new instance of effect.
///
///
public GammaTransfer(DeviceContext context) : base(context, Effect.GammaTransfer)
{
}
///
/// The amplitude of the gamma transfer function for the Red channel.
///
public float RedAmplitude
{
get
{
return GetFloatValue((int)GammaTransferProperties.RedAmplitude);
}
set
{
SetValue((int)GammaTransferProperties.RedAmplitude, value);
}
}
///
/// The exponent of the gamma transfer function for the Red channel.
///
public float RedExponent
{
get
{
return GetFloatValue((int)GammaTransferProperties.RedExponent);
}
set
{
SetValue((int)GammaTransferProperties.RedExponent, value);
}
}
///
/// The offset of the gamma transfer function for the Red channel.
///
public float RedOffset
{
get
{
return GetFloatValue((int)GammaTransferProperties.RedOffset);
}
set
{
SetValue((int)GammaTransferProperties.RedOffset, value);
}
}
///
/// If you set this to TRUE it does not apply the transfer function to the Red channel. An identity transfer function is used. If you set this to FALSE it applies the gamma transfer function to the Red channel.
///
public bool RedDisable
{
get
{
return GetBoolValue((int)GammaTransferProperties.RedDisable);
}
set
{
SetValue((int)GammaTransferProperties.RedDisable, value);
}
}
///
/// The amplitude of the gamma transfer function for the Green channel.
///
public float GreenAmplitude
{
get
{
return GetFloatValue((int)GammaTransferProperties.GreenAmplitude);
}
set
{
SetValue((int)GammaTransferProperties.GreenAmplitude, value);
}
}
///
/// The exponent of the gamma transfer function for the Green channel.
///
public float GreenExponent
{
get
{
return GetFloatValue((int)GammaTransferProperties.GreenExponent);
}
set
{
SetValue((int)GammaTransferProperties.GreenExponent, value);
}
}
///
/// The offset of the gamma transfer function for the Green channel.
///
public float GreenOffset
{
get
{
return GetFloatValue((int)GammaTransferProperties.GreenOffset);
}
set
{
SetValue((int)GammaTransferProperties.GreenOffset, value);
}
}
///
/// If you set this to TRUE it does not apply the transfer function to the Green channel. An identity transfer function is used. If you set this to FALSE it applies the gamma transfer function to the Green channel.
///
public bool GreenDisable
{
get
{
return GetBoolValue((int)GammaTransferProperties.GreenDisable);
}
set
{
SetValue((int)GammaTransferProperties.GreenDisable, value);
}
}
///
/// The amplitude of the gamma transfer function for the Blue channel.
///
public float BlueAmplitude
{
get
{
return GetFloatValue((int)GammaTransferProperties.BlueAmplitude);
}
set
{
SetValue((int)GammaTransferProperties.BlueAmplitude, value);
}
}
///
/// The exponent of the gamma transfer function for the Blue channel.
///
public float BlueExponent
{
get
{
return GetFloatValue((int)GammaTransferProperties.BlueExponent);
}
set
{
SetValue((int)GammaTransferProperties.BlueExponent, value);
}
}
///
/// The offset of the gamma transfer function for the Blue channel.
///
public float BlueOffset
{
get
{
return GetFloatValue((int)GammaTransferProperties.BlueOffset);
}
set
{
SetValue((int)GammaTransferProperties.BlueOffset, value);
}
}
///
/// If you set this to TRUE it does not apply the transfer function to the Blue channel. An identity transfer function is used. If you set this to FALSE it applies the gamma transfer function to the Blue channel.
///
public bool BlueDisable
{
get
{
return GetBoolValue((int)GammaTransferProperties.BlueDisable);
}
set
{
SetValue((int)GammaTransferProperties.BlueDisable, value);
}
}
///
/// The amplitude of the gamma transfer function for the Alpha channel.
///
public float AlphaAmplitude
{
get
{
return GetFloatValue((int)GammaTransferProperties.AlphaAmplitude);
}
set
{
SetValue((int)GammaTransferProperties.AlphaAmplitude, value);
}
}
///
/// The exponent of the gamma transfer function for the Alpha channel.
///
public float AlphaExponent
{
get
{
return GetFloatValue((int)GammaTransferProperties.AlphaExponent);
}
set
{
SetValue((int)GammaTransferProperties.AlphaExponent, value);
}
}
///
/// The offset of the gamma transfer function for the Alpha channel.
///
public float AlphaOffset
{
get
{
return GetFloatValue((int)GammaTransferProperties.AlphaOffset);
}
set
{
SetValue((int)GammaTransferProperties.AlphaOffset, value);
}
}
///
/// If you set this to TRUE it does not apply the transfer function to the Alpha channel. An identity transfer function is used. If you set this to FALSE it applies the gamma transfer function to the Alpha channel.
///
public bool AlphaDisable
{
get
{
return GetBoolValue((int)GammaTransferProperties.AlphaDisable);
}
set
{
SetValue((int)GammaTransferProperties.AlphaDisable, value);
}
}
///
/// Whether the effect clamps color values to between 0 and 1 before the effect passes the values to the next effect in the graph. The effect clamps the values before it premultiplies the alpha .
/// if you set this to TRUE the effect will clamp the values.
/// If you set this to FALSE, the effect will not clamp the color values, but other effects and the output surface may clamp the values if they are not of high enough precision.
///
public bool ClampOutput
{
get
{
return GetBoolValue((int)GammaTransferProperties.ClampOutput);
}
set
{
SetValue((int)GammaTransferProperties.ClampOutput, value);
}
}
}
}