Ejemplo n.º 1
0
        internal override void Draw(MousePoint p)
        {
            if (t_particles.Length == 0)
            {
                return;
            }

            if (!t_skipper.Skip())
            {
                return;
            }

            // atractor must follow the pen between each call to draw
            int[] delta          = MousePoint.Delta(t_previousPoint, p);
            Engine.Calc.Vector d = new Engine.Calc.Vector(delta[0], delta[1]);
            t_attractor.Move(d);

            if (t_imageSource.IsOutOfBounds(p.X, p.Y))
            {
                return;
            }

            Engine.Threading.ThreadedLoop loop = new Threading.ThreadedLoop();

            Engine.Threading.ParamList paramList = new Threading.ParamList();
            paramList.Add("x", typeof(int), p.X);
            paramList.Add("y", typeof(int), p.Y);

            loop.Loop(t_particles.Length, Threaded_Draw, paramList);
            loop.Dispose();

            t_previousPoint = p;
        }
Ejemplo n.º 2
0
        internal override void Draw(MousePoint p)
        {
            if (!t_skipper.Skip())
            {
                return;
            }

            if (t_imageSource.IsOutOfBounds(p.X, p.Y))
            {
                return;
            }

            Engine.Color.Cell col;
            t_colorVariance.Step();

            if (t_useColorFromImage)
            {
                col = t_imageSource.GetPixel(p.X, p.Y, PixelRetrievalOptions.ReturnEdgePixel);
                t_colorVariance.SetColor(col);
                col       = t_colorVariance.ColorVariation;
                col.Alpha = t_alpha;
            }
            else
            {
                col       = t_colorVariance.ColorVariation;
                col.Alpha = t_alpha;
            }

            // particles must follow the pen between each call to draw
            int[] delta          = MousePoint.Delta(t_previousPoint, p);
            Engine.Calc.Vector d = new Engine.Calc.Vector(delta[0], delta[1]);

            foreach (Engine.Effects.Particles.Obsolete.PixelParticle_O px in t_particles)
            {
                px.Move(d);

                px.Draw(t_imageSource, col);
            }

            t_previousPoint = p;
        }