Пример #1
0
        private void ShowTooltips()
        {
            blackToolTip.Show(BlackPoint.ToString("F4"), this,
                              this.ClientRectangle.Left + (int)(this.ClientRectangle.Width * m_BlackDelta), this.ClientRectangle.Bottom);

            whiteToolTip.Show(WhitePoint.ToString("F4"), this,
                              this.ClientRectangle.Left + (int)(this.ClientRectangle.Width * m_WhiteDelta), this.ClientRectangle.Top - 15);
        }
Пример #2
0
 /// <inheritdoc cref="object" />
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = WhitePoint.GetHashCode();
         hashCode = (hashCode * 397) ^ ChromaticityCoordinates.GetHashCode();
         hashCode = (hashCode * 397) ^ (Companding != null ? Companding.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #3
0
        public LuvColor ToLuv(XYZColor color)
        {
            if (color == null)
            {
                throw new ArgumentNullException("color");
            }

            // adaptation
            XYZColor adapted = !WhitePoint.Equals(TargetLuvWhitePoint) && IsChromaticAdaptationPerformed
                ? ChromaticAdaptation.Transform(color, WhitePoint, TargetLuvWhitePoint)
                : color;

            // conversion
            var      converter = new XYZToLuvConverter(TargetLuvWhitePoint);
            LuvColor result    = converter.Convert(adapted);

            return(result);
        }