blob: af50531cc0e114a9763865157c98d8200752b232 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
using System.Drawing;
namespace Tango.Pulse
{
/// <summary>
/// Represents a twn file brush stop.
/// </summary>
public class TwnStop
{
/// <summary>
/// The RGB red component.
/// </summary>
public byte R { get; set; }
/// <summary>
/// The RGB green component.
/// </summary>
public byte G { get; set; }
/// <summary>
/// The RGB blue component.
/// </summary>
public byte B { get; set; }
/// <summary>
/// The Brush stop offset position within the parent brush length in percentage (0-1).
/// </summary>
public float Offset { get; set; }
/// <summary>
/// Gets or sets the stop color.
/// </summary>
public Color Color
{
get { return Color.FromArgb(R, G, B); }
set
{
R = value.R;
G = value.G;
B = value.B;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="TwnStop"/> class.
/// </summary>
public TwnStop()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="TwnStop"/> class.
/// </summary>
/// <param name="r">Red.</param>
/// <param name="g">Green.</param>
/// <param name="b">Blue.</param>
/// <param name="offset">Offset.</param>
public TwnStop(byte r, byte g, byte b, float offset) : this()
{
R = r;
G = g;
B = b;
Offset = offset;
}
}
}
|