Ejemplo n.º 1
0
 /// <summary>
 /// Serves as a hash function for a <see cref="ProfileID"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="ProfileID"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ CMP.GetHashCode(Values);
         return(hash);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Serves as a hash function for a <see cref="ProfileFlag"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="ProfileFlag"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= CMP.GetHashCode(Flags);
         return(hash);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Serves as a hash function for a <see cref="ProfileSequenceIdentifier"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="ProfileSequenceIdentifier"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ ID.GetHashCode();
         hash *= 16777619 ^ CMP.GetHashCode(Description);
         return(hash);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Serves as a hash function for a <see cref="SampledCurveElement"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="SampledCurveElement"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ Signature.GetHashCode();
         hash *= CMP.GetHashCode(CurveEntries);
         return(hash);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Serves as a hash function for a <see cref="OneDimensionalCurve"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="OneDimensionalCurve"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= CMP.GetHashCode(BreakPoints);
         hash *= CMP.GetHashCode(Segments);
         return(hash);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Serves as a hash function for a <see cref="NamedColor"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="NamedColor"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ Name.GetHashCode();
         hash *= CMP.GetHashCode(PCScoordinates);
         hash *= CMP.GetHashCode(DeviceCoordinates);
         return(hash);
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Serves as a hash function for a <see cref="ResponseCurve"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="ResponseCurve"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ CurveType.GetHashCode();
         hash *= CMP.GetHashCode(XYZvalues);
         hash *= CMP.GetHashCode(ResponseArrays);
         return(hash);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Serves as a hash function for a <see cref="CLUT"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="CLUT"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ InputChannelCount.GetHashCode();
         hash *= 16777619 ^ OutputChannelCount.GetHashCode();
         hash *= CMP.GetHashCode(GridPointCount);
         hash *= CMP.GetHashCode(Values);
         return(hash);
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Determines whether the specified <see cref="SampledCurveElement"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="SampledCurveElement"/></param>
 /// <param name="b">The second <see cref="SampledCurveElement"/></param>
 /// <returns>True if the <see cref="SampledCurveElement"/>s are equal; otherwise, false</returns>
 public static bool operator ==(SampledCurveElement a, SampledCurveElement b)
 {
     if (ReferenceEquals(a, b))
     {
         return(true);
     }
     if ((object)a == null || (object)b == null)
     {
         return(false);
     }
     return(a.Signature == b.Signature && CMP.Compare(a.CurveEntries, b.CurveEntries));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Serves as a hash function for a <see cref="CurveSetProcessElement"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="CurveSetProcessElement"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ Signature.GetHashCode();
         hash *= 16777619 ^ InputChannelCount.GetHashCode();
         hash *= 16777619 ^ OutputChannelCount.GetHashCode();
         hash *= CMP.GetHashCode(Curves);
         return(hash);
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Serves as a hash function for a <see cref="DeviceAttribute"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="DeviceAttribute"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ Opacity.GetHashCode();
         hash *= 16777619 ^ Reflectivity.GetHashCode();
         hash *= 16777619 ^ Polarity.GetHashCode();
         hash *= 16777619 ^ Chroma.GetHashCode();
         hash *= CMP.GetHashCode(VendorData);
         return(hash);
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// Determines whether the specified <see cref="LUT"/>s are equal to each other.
        /// </summary>
        /// <param name="a">The first <see cref="LUT"/></param>
        /// <param name="b">The second <see cref="LUT"/></param>
        /// <returns>True if the <see cref="LUT"/>s are equal; otherwise, false</returns>
        public static bool operator ==(LUT a, LUT b)
        {
            if (ReferenceEquals(a, b))
            {
                return(true);
            }
            if ((object)a == null || (object)b == null)
            {
                return(false);
            }

            return(CMP.Compare(a.Values, b.Values));
        }
Ejemplo n.º 13
0
 /// <summary>
 /// Determines whether the specified <see cref="CurveSetProcessElement"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="CurveSetProcessElement"/></param>
 /// <param name="b">The second <see cref="CurveSetProcessElement"/></param>
 /// <returns>True if the <see cref="CurveSetProcessElement"/>s are equal; otherwise, false</returns>
 public static bool operator ==(CurveSetProcessElement a, CurveSetProcessElement b)
 {
     if (ReferenceEquals(a, b))
     {
         return(true);
     }
     if ((object)a == null || (object)b == null)
     {
         return(false);
     }
     return(a.Signature == b.Signature && a.InputChannelCount == b.InputChannelCount &&
            a.OutputChannelCount == b.OutputChannelCount && CMP.Compare(a.Curves, b.Curves));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Calculates a hash code of these values:
 /// <para> - <see cref="Class"/></para>
 /// <para> - <see cref="DataColorspace"/></para>
 /// <para> - <see cref="PCS"/></para>
 /// <para> - <see cref="PCSIlluminant"/></para>
 /// <para> - <see cref="Data"/></para>
 /// </summary>
 /// <returns>The hash code of the listed values</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ Class.GetHashCode();
         hash *= 16777619 ^ DataColorspace.GetHashCode();
         hash *= 16777619 ^ PCS.GetHashCode();
         hash *= 16777619 ^ PCSIlluminant.GetHashCode();
         hash *= CMP.GetHashCode(Data);
         return(hash);
     }
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Serves as a hash function for a <see cref="ProfileDescription"/>.
 /// </summary>
 /// <returns>A hash code for the current <see cref="ProfileDescription"/></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash *= 16777619 ^ DeviceManufacturer.GetHashCode();
         hash *= 16777619 ^ DeviceModel.GetHashCode();
         hash *= 16777619 ^ DeviceAttributes.GetHashCode();
         hash *= 16777619 ^ TechnologyInformation.GetHashCode();
         hash *= 16777619 ^ CMP.GetHashCode(DeviceManufacturerInfo);
         hash *= 16777619 ^ CMP.GetHashCode(DeviceModelInfo);
         return(hash);
     }
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Determines whether the specified <see cref="MatrixProcessElement"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="MatrixProcessElement"/></param>
 /// <param name="b">The second <see cref="MatrixProcessElement"/></param>
 /// <returns>True if the <see cref="MatrixProcessElement"/>s are equal; otherwise, false</returns>
 public static bool operator ==(MatrixProcessElement a, MatrixProcessElement b)
 {
     if (ReferenceEquals(a, b))
     {
         return(true);
     }
     if ((object)a == null || (object)b == null)
     {
         return(false);
     }
     return(a.Signature == b.Signature && a.InputChannelCount == b.InputChannelCount &&
            a.OutputChannelCount == b.OutputChannelCount && CMP.Compare(a.MatrixIxO, b.MatrixIxO) &&
            CMP.Compare(a.MatrixOx1, b.MatrixOx1));
 }
Ejemplo n.º 17
0
        /// <summary>
        /// Determines whether the specified <see cref="CLUT"/>s are equal to each other.
        /// </summary>
        /// <param name="a">The first <see cref="CLUT"/></param>
        /// <param name="b">The second <see cref="CLUT"/></param>
        /// <returns>True if the <see cref="CLUT"/>s are equal; otherwise, false</returns>
        public static bool operator ==(CLUT a, CLUT b)
        {
            if (ReferenceEquals(a, b))
            {
                return(true);
            }
            if ((object)a == null || (object)b == null)
            {
                return(false);
            }

            return(a.InputChannelCount == b.InputChannelCount && a.OutputChannelCount == b.OutputChannelCount &&
                   CMP.Compare(a.GridPointCount, b.GridPointCount) && CMP.Compare(a.Values, b.Values));
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Compares this profile to another object.
        /// <para>Compared values are:</para>
        /// <para> - <see cref="Class"/></para>
        /// <para> - <see cref="DataColorspace"/></para>
        /// <para> - <see cref="PCS"/></para>
        /// <para> - <see cref="PCSIlluminant"/></para>
        /// <para> - <see cref="Data"/></para>
        /// </summary>
        /// <param name="obj">The object to compare to</param>
        /// <returns>True if the listed values are the same, false otherwise</returns>
        public bool Equals(ICCProfile obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            return(Class == obj.Class && DataColorspace == obj.DataColorspace && PCS == obj.PCS &&
                   PCSIlluminant == obj.PCSIlluminant && CMP.Compare(Data, obj.Data));
        }
Ejemplo n.º 19
0
 /// <summary>
 /// Determines whether the specified <see cref="OneDimensionalCurve"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="OneDimensionalCurve"/></param>
 /// <param name="b">The second <see cref="OneDimensionalCurve"/></param>
 /// <returns>True if the <see cref="OneDimensionalCurve"/>s are equal; otherwise, false</returns>
 public static bool operator ==(OneDimensionalCurve a, OneDimensionalCurve b)
 {
     return(CMP.Compare(a.BreakPoints, b.BreakPoints) &&
            CMP.Compare(a.Segments, b.Segments));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Determines whether the specified <see cref="DeviceAttribute"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="DeviceAttribute"/></param>
 /// <param name="b">The second <see cref="DeviceAttribute"/></param>
 /// <returns>True if the <see cref="DeviceAttribute"/>s are equal; otherwise, false</returns>
 public static bool operator ==(DeviceAttribute a, DeviceAttribute b)
 {
     return(a.Opacity == b.Opacity && a.Reflectivity == b.Reflectivity &&
            a.Polarity == b.Polarity && a.Chroma == b.Chroma &&
            CMP.Compare(a.VendorData, b.VendorData));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Determines whether the specified <see cref="ResponseCurve"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="ResponseCurve"/></param>
 /// <param name="b">The second <see cref="ResponseCurve"/></param>
 /// <returns>True if the <see cref="ResponseCurve"/>s are equal; otherwise, false</returns>
 public static bool operator ==(ResponseCurve a, ResponseCurve b)
 {
     return(a.CurveType == b.CurveType && CMP.Compare(a.XYZvalues, b.XYZvalues) &&
            CMP.Compare(a.ResponseArrays, b.ResponseArrays));
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Determines whether the specified <see cref="NamedColor"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="NamedColor"/></param>
 /// <param name="b">The second <see cref="NamedColor"/></param>
 /// <returns>True if the <see cref="NamedColor"/>s are equal; otherwise, false</returns>
 public static bool operator ==(NamedColor a, NamedColor b)
 {
     return(a.Name == b.Name && CMP.Compare(a.PCScoordinates, b.PCScoordinates) &&
            CMP.Compare(a.DeviceCoordinates, b.DeviceCoordinates));
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Determines whether the specified <see cref="ProfileID"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="ProfileID"/></param>
 /// <param name="b">The second <see cref="ProfileID"/></param>
 /// <returns>True if the <see cref="ProfileID"/>s are equal; otherwise, false</returns>
 public static bool operator ==(ProfileID a, ProfileID b)
 {
     return(CMP.Compare(a.Values, b.Values));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Determines whether the specified <see cref="ProfileFlag"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="ProfileFlag"/></param>
 /// <param name="b">The second <see cref="ProfileFlag"/></param>
 /// <returns>True if the <see cref="ProfileFlag"/>s are equal; otherwise, false</returns>
 public static bool operator ==(ProfileFlag a, ProfileFlag b)
 {
     return(CMP.Compare(a.Flags, b.Flags));
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Determines whether the specified <see cref="ProfileSequenceIdentifier"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="ProfileSequenceIdentifier"/></param>
 /// <param name="b">The second <see cref="ProfileSequenceIdentifier"/></param>
 /// <returns>True if the <see cref="ProfileSequenceIdentifier"/>s are equal; otherwise, false</returns>
 public static bool operator ==(ProfileSequenceIdentifier a, ProfileSequenceIdentifier b)
 {
     return(a.ID == b.ID && CMP.Compare(a.Description, b.Description));
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Determines whether the specified <see cref="ProfileDescription"/>s are equal to each other.
 /// </summary>
 /// <param name="a">The first <see cref="ProfileDescription"/></param>
 /// <param name="b">The second <see cref="ProfileDescription"/></param>
 /// <returns>True if the <see cref="ProfileDescription"/>s are equal; otherwise, false</returns>
 public static bool operator ==(ProfileDescription a, ProfileDescription b)
 {
     return(a.DeviceManufacturer == b.DeviceManufacturer && a.DeviceModel == b.DeviceModel &&
            a.DeviceAttributes == b.DeviceAttributes && a.TechnologyInformation == b.TechnologyInformation &&
            CMP.Compare(a.DeviceManufacturerInfo, b.DeviceManufacturerInfo) && CMP.Compare(a.DeviceModelInfo, b.DeviceModelInfo));
 }