/// <summary> /// Determines whether the specified color 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> /// <returns>True when the specified color is fuzzy equal to the current instance.</returns> public bool FuzzyEquals(IMagickColor <QuantumType> other, Percentage fuzz) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } using (var instance = CreateNativeInstance(this)) { return(instance.FuzzyEquals(other, PercentageHelper.ToQuantumType(fuzz))); } }
/// <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(PercentageHelper.ToQuantumType(cyan), PercentageHelper.ToQuantumType(magenta), PercentageHelper.ToQuantumType(yellow), PercentageHelper.ToQuantumType(key), PercentageHelper.ToQuantumType(alpha))) { }