using System.Drawing;
namespace Tango.Pulse
{
///
/// Represents a twn file brush stop.
///
public class TwnStop
{
///
/// The RGB red component.
///
public byte R { get; set; }
///
/// The RGB green component.
///
public byte G { get; set; }
///
/// The RGB blue component.
///
public byte B { get; set; }
///
/// The Brush stop offset position within the parent brush length in percentage (0-1).
///
public float Offset { get; set; }
///
/// Gets or sets the stop color.
///
public Color Color
{
get { return Color.FromArgb(R, G, B); }
set
{
R = value.R;
G = value.G;
B = value.B;
}
}
///
/// Initializes a new instance of the class.
///
public TwnStop()
{
}
///
/// Initializes a new instance of the class.
///
/// Red.
/// Green.
/// Blue.
/// Offset.
public TwnStop(byte r, byte g, byte b, float offset) : this()
{
R = r;
G = g;
B = b;
Offset = offset;
}
}
}