Esempio n. 1
0
        ///<summary>
        /// Determines whether the specified geometry is fuzzy equal to the current color.
        ///</summary>
        ///<param name="other">The color to compare this color with.</param>
        /// <param name="fuzz">The fuzz factor.</param>
        public bool FuzzyEquals(MagickColor other, Percentage fuzz)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            return(_Instance.FuzzyEquals(other._Instance, fuzz.ToQuantum()));
        }
Esempio n. 2
0
        ///<summary>
        /// Determines whether the specified geometry is fuzzy equal to the current color.
        ///</summary>
        ///<param name="other">The color to compare this color with.</param>
        /// <param name="fuzz">The fuzz factor.</param>
        public bool FuzzyEquals(MagickColor other, Percentage fuzz)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            using (NativeMagickColor instance = CreateNativeInstance())
            {
                return(instance.FuzzyEquals(other, fuzz.ToQuantum()));
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColorCMYK"/> class.
 /// </summary>
 /// <param name="cyan">Cyan component value of this color.</param>
 /// <param name="magenta">Magenta component value of this color.</param>
 /// <param name="yellow">Yellow component value of this color.</param>
 /// <param name="key">Key (black) component value of this color.</param>
 /// <param name="alpha">Alpha component value of this color.</param>
 public ColorCMYK(Percentage cyan, Percentage magenta, Percentage yellow, Percentage key, Percentage alpha)
     : base(new MagickColor(cyan.ToQuantum(), magenta.ToQuantum(), yellow.ToQuantum(), key.ToQuantum(), alpha.ToQuantum()))
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColorCMYK"/> class.
 /// </summary>
 /// <param name="cyan">Cyan component value of this color.</param>
 /// <param name="magenta">Magenta component value of this color.</param>
 /// <param name="yellow">Yellow component value of this color.</param>
 /// <param name="key">Key (black) component value of this color.</param>
 public ColorCMYK(Percentage cyan, Percentage magenta, Percentage yellow, Percentage key)
     : base(new MagickColor(cyan.ToQuantum(), magenta.ToQuantum(), yellow.ToQuantum(), key.ToQuantum(), Quantum.Max))
 {
 }