Exemple #1
0
        public void Animate()
        {
            // Color Generation
            DRColor.HSV color_gen = _huey.getNextColor((float)Slider1Value, (float)Slider2Value, (float)Slider3Value);
            DRColor.RGB new_color = new DRColor.RGB(color_gen);

            // Position Generation
            Rainbow.Kai[23] = new_color;
            Rainbow.Kai[24] = new_color;
            Push();
            RainbowUtils.update();
            Thread.Sleep(refreshRate);
        }
Exemple #2
0
        protected override void OnPaint(PaintEventArgs pe)
        {
            // Call the OnPaint method of the base class.
            base.OnPaint(pe);

            if (mood.Color_List.Count != 0)
            {
                Graphics g = pe.Graphics;
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

                Size rect_size = new Size(this.ClientSize.Width / mood.Color_List.Count, this.ClientSize.Height);
                int  count     = 0;
                foreach (DRColor.RGB rgb in mood.Color_List)
                {
                    Point      p       = new Point(count * rect_size.Width, 0);
                    SolidBrush myBrush = new SolidBrush(DRColor.RGBtoColor(RainbowUtils.increaseBrightness(rgb, 130)));
                    g.FillEllipse(myBrush, new Rectangle(p, rect_size));
                    myBrush.Dispose();
                    count++;
                }
            }
        }
        public void Animation()
        {
            List <DRColor.RGB> color_list = current_moodSeqUI.getColors();

            for (int i = 0; i < color_list.Count; i++)
            {
                DRColor.RGB cur  = color_list[i];
                DRColor.RGB next = color_list[(i + 1) % color_list.Count];

                // Smoothening effect
                double j = 1.0;
                while (j > 0.0)
                {
                    DRColor.RGB show_color = Blender.variableMix(cur, next, j);
                    RainbowUtils.fillBoth(show_color);
                    Thread.Sleep(speed);
                    if (halt)
                    {
                        return;
                    }
                    j -= 0.05;
                }
            }
        }
Exemple #4
0
 private void OptionMenu_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     RainbowUtils.TurnOff();
 }
Exemple #5
0
 private void ClearButton(object sender, EventArgs e)
 {
     RainbowUtils.TurnOff();
 }