Наследование: BaseEffect
		public void GlowEffect2 ()
		{
			var src = GetSourceImage ("input.png");

			var effect = new GlowEffect (12, 50, 50);
			effect.Render (src);

			Compare (src, "glow2.png");
		}
		/// <summary>
		/// Creates a new effect that will make an image look like an ink sketch.
		/// </summary>
		/// <param name="inkOutline">Size of the ink outline. Valid range is 0 - 99.</param>
		/// <param name="coloring">Amount of color to keep. Valid range is 0 - 100.</param>
		public InkSketchEffect (int inkOutline = 50, int coloring = 50)
		{
			if (inkOutline < 0 || inkOutline > 99)
				throw new ArgumentOutOfRangeException ("inkOutline");
			if (coloring < 0 || coloring > 100)
				throw new ArgumentOutOfRangeException ("coloring");

			ink_outline = inkOutline;
			this.coloring = coloring;

			glow_effect = new GlowEffect (6, -(coloring - 50) * 2, -(coloring - 50) * 2);
			desaturate_op = new DesaturateOp ();
			darken_op = new DarkenBlendOp ();
		}
Пример #3
0
        /// <summary>
        /// Creates a new effect that will make an image look like an ink sketch.
        /// </summary>
        /// <param name="inkOutline">Size of the ink outline. Valid range is 0 - 99.</param>
        /// <param name="coloring">Amount of color to keep. Valid range is 0 - 100.</param>
        public InkSketchEffect(int inkOutline = 50, int coloring = 50)
        {
            if (inkOutline < 0 || inkOutline > 99)
            {
                throw new ArgumentOutOfRangeException("inkOutline");
            }
            if (coloring < 0 || coloring > 100)
            {
                throw new ArgumentOutOfRangeException("coloring");
            }

            ink_outline   = inkOutline;
            this.coloring = coloring;

            glow_effect   = new GlowEffect(6, -(coloring - 50) * 2, -(coloring - 50) * 2);
            desaturate_op = new DesaturateOp();
            darken_op     = new DarkenBlendOp();
        }