示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="red">Red component.</param>
 /// <param name="green">The green component.</param>
 /// <param name="blue">The blue component.</param>
 /// <remarks>With Alpha = 1.0</remarks>
 public Color(byte red, byte green, byte blue)
 {
     this.internalAlpha = 1f;
     this.red = red;
     this.green = green;
     this.blue = blue;
     this.colorDisplayBehavior = ColorDisplayBehavior.Normal;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="color">All data will be copied from this color instance.</param>
 public Color(Color color)
 {
     this.internalAlpha = color.Alpha;
     this.red = color.Red;
     this.green = color.Green;
     this.blue = color.Blue;
     this.colorDisplayBehavior = color.ColorDisplayBehavior;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="red">Red component.</param>
 /// <param name="green">The green component.</param>
 /// <param name="blue">The blue component.</param>
 /// <param name="alpha">The alpha channel. <remarks>Should be between 0 and 1.0.</remarks></param>
 /// <param name="behavior">The displaying behavior.</param>
 public Color(byte red, byte green, byte blue, float alpha, ColorDisplayBehavior behavior)
     : this(red, green, blue, alpha)
 {
     ColorDisplayBehavior = behavior;
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="red">Red component.</param>
 /// <param name="green">The green component.</param>
 /// <param name="blue">The blue component.</param>
 /// <param name="behavior">The displaying behavior.</param>
 public Color(byte red, byte green, byte blue, ColorDisplayBehavior behavior)
     : this(red, green, blue)
 {
     colorDisplayBehavior = behavior;
 }