コード例 #1
0
 public Circle(int x, int y, double radianY, double step, ColorRotator colorRotator)
     : base(x, y, colorRotator)
 {
     this.step    = step;
     this.radianY = radianY;
     LineLength   = 2;
     Diameter     = 20;
 }
コード例 #2
0
 public SineWave(double radianY, int y, double waveSpeed, ColorRotator colorRotator)
     : base(1, y, colorRotator)
 {
     this.radianY   = radianY;
     this.waveSpeed = waveSpeed;
     WaveLength     = 20;
     LineLength     = 100;
 }
コード例 #3
0
        // this method is not used. See the comment in GradientHorizon.cs
        private void AddGradientHorizon()
        {
            Color startColor = new Color();

            startColor.R = startColor.G = startColor.B = 50; startColor.A = 255;

            ColorRotator rotator = new ColorRotator(startColor, new SignedColor(0, 0, 0, 0));

            shapeList.Add(new GradientHorizon(rotator));
        }
コード例 #4
0
        private void AddCircles()
        {
            Color startColor = new Color();

            startColor.R = startColor.G = startColor.B = 50; startColor.A = 255;

            ColorRotator rotator = new ColorRotator(startColor, new SignedColor(1, 0, 0, 0));

            shapeList.Add(new Circle(100, 100, 0.3, 0.1, rotator));

            rotator = new ColorRotator(startColor, new SignedColor(0, 1, 0, 0));
            shapeList.Add(new Circle(100, 100, 1.2, 0.15, rotator));

            rotator = new ColorRotator(startColor, new SignedColor(0, 1, 0, 0));
            shapeList.Add(new Circle(100, 100, 2.2, 0.5, rotator));
        }
コード例 #5
0
        private void AddSineWaves()
        {
            Color startColor = new Color();

            startColor.R = startColor.G = startColor.B = 50; startColor.A = 255;

            ColorRotator rotator = new ColorRotator(startColor, new SignedColor(2, 0, 1, 1));

            shapeList.Add(new SineWave(1.7, 180, 0.02, rotator));

            rotator = new ColorRotator(startColor, new SignedColor(0, 1, 1, 1));
            shapeList.Add(new SineWave(0, 200, 0.01, rotator));

            rotator = new ColorRotator(startColor, new SignedColor(1, 0, 1, 1));
            shapeList.Add(new SineWave(3.1, 190, 0.025, rotator));

            rotator = new ColorRotator(startColor, new SignedColor(1, 1, 0, 2));
            shapeList.Add(new SineWave(2.5, 250, 0.015, rotator));
        }
コード例 #6
0
 public GradientHorizon(ColorRotator colorRotator)
     : base(1, 1, colorRotator)
 {
 }
コード例 #7
0
 public Shape(int x, int y, ColorRotator colorRotator)
 {
     this.x = x;
     this.y = y;
     color  = colorRotator;
 }