コード例 #1
0
        public static GloColor operator *(double a, GloColor c)
        {
            int r = (int)Math.Round(a * c.r);
            int g = (int)Math.Round(a * c.g);
            int b = (int)Math.Round(a * c.b);

            return(GloColor.FromRGB(r, g, b));
        }
コード例 #2
0
 public void Tick(TimeSpan progress)
 {
     //while (nextExecutionTime < DateTime.Now)
     while (cursor <= progress)
     {
         if (programQueue.MoveNext())
         {
             nextExecutionTime += programQueue.Current;
             cursor            += programQueue.Current;
         }
         else
         {
             Running      = false;
             currentColor = GloColor.FromRGB(0, 0, 0);
             break;
         }
     }
 }
コード例 #3
0
 public static GloColor operator+(GloColor c1, GloColor c2)
 {
     return(GloColor.FromRGB(c1.r + c2.r, c1.g + c2.g, c1.b + c2.b));
 }