Exemple #1
0
        /// <summary>
        /// Compares this whitepoint with another for their equality of values
        /// </summary>
        /// <param name="obj">The whitepoint to compare to</param>
        /// <returns>True if they are the same, false otherwise</returns>
        public override bool Equals(object obj)
        {
            Whitepoint c = obj as Whitepoint;

            if ((object)c == null)
            {
                return(false);
            }
            return(this == c);
        }
Exemple #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="Colorspace"/> class
 /// </summary>
 /// <param name="wp">The reference white</param>
 public Colorspace(Whitepoint wp)
 {
     if (wp != null)
     {
         RefWhite = wp;
     }
     else
     {
         RefWhite = Whitepoint.Default;
     }
 }
Exemple #3
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorXYZ"/> class
 /// </summary>
 /// <param name="X">Value for the X channel</param>
 /// <param name="Y">Value for the Y channel</param>
 /// <param name="Z">Value for the Z channel</param>
 /// <param name="wp">The reference white for this color</param>
 public ColorXYZ(double X, double Y, double Z, Whitepoint wp)
     : base(new Colorspace(wp), X, Y, Z)
 {
 }
Exemple #4
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorXYZ"/> class
 /// </summary>
 /// <param name="wp">The reference white for this color</param>
 public ColorXYZ(Whitepoint wp)
     : base(new Colorspace(wp), 0, 0, 0)
 {
 }
Exemple #5
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorLuv"/> class
 /// </summary>
 /// <param name="L">Value for the Lightness channel</param>
 /// <param name="u">Value for the u channel</param>
 /// <param name="v">Value for the v channel</param>
 /// <param name="wp">The reference white for this color</param>
 public ColorLuv(double L, double u, double v, Whitepoint wp)
     : base(new Colorspace(wp), L, u, v)
 {
 }
Exemple #6
0
 /// <summary>
 /// Creates a new instance of the <see cref="Colorspace"/> class with the default reference white
 /// </summary>
 public Colorspace()
 {
     RefWhite = Whitepoint.Default;
 }
Exemple #7
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorLab"/> class
 /// </summary>
 /// <param name="L">Value for the Lightness channel</param>
 /// <param name="a">Value for the a channel</param>
 /// <param name="b">Value for the b channel</param>
 /// <param name="wp">The reference white for this color</param>
 public ColorLab(double L, double a, double b, Whitepoint wp)
     : base(new Colorspace(wp), L, a, b)
 {
 }
Exemple #8
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorYxy"/> class
 /// </summary>
 /// <param name="Y">Value for the Y channel</param>
 /// <param name="x">Value for the x channel</param>
 /// <param name="y">Value for the y channel</param>
 /// <param name="wp">The reference white for this color</param>
 public ColorYxy(double Y, double x, double y, Whitepoint wp)
     : base(new Colorspace(wp), Y, x, y)
 {
 }
Exemple #9
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorspaceGray"/> class
 /// </summary>
 /// <param name="wp">The reference white of this colorspace</param>
 /// <param name="gamma">The gamma value of this colorspace</param>
 public ColorspaceGray(Whitepoint wp, double gamma)
     : base(wp)
 {
     _Gamma  = gamma;
     _Gamma1 = 1d / gamma;
 }
Exemple #10
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorspaceGray"/> class
 /// with a gamma value of 1.0
 /// </summary>
 /// <param name="wp">The reference white of this colorspace</param>
 public ColorspaceGray(Whitepoint wp)
     : this(wp, 1.0)
 {
 }
Exemple #11
0
 /// <summary>
 /// Creates a new instance of the <see cref="ColorspaceRGB"/> class
 /// </summary>
 /// <param name="wp">The whitepoint of this colorspace</param>
 protected ColorspaceRGB(Whitepoint wp)
     : base(wp)
 {
 }