Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="value">The value that will be assigned to all components.</param>
 public Color(float value) : this()
 {
     _packedValue = PackHelpers.PackRGBA(value, value, value, value);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="vector">The red, green, and blue components of the color.</param>
 /// <param name="alpha">The alpha component of the color.</param>
 public Color(Vector3 vector, float alpha) : this()
 {
     _packedValue = PackHelpers.PackRGBA(vector.X, vector.Y, vector.Z, alpha);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="vector">A four-component color.</param>
 public Color(Vector4 vector) : this()
 {
     _packedValue = PackHelpers.PackRGBA(vector.X, vector.Y, vector.Z, vector.W);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Color"/> struct.
 /// </summary>
 /// <param name="r">Red component.</param>
 /// <param name="g">Green component.</param>
 /// <param name="b">Blue component.</param>
 /// <param name="a">Alpha component.</param>
 public Color(float r, float g, float b, float a) : this()
 {
     _packedValue = PackHelpers.PackRGBA(r, g, b, a);
 }