using System;
using System.Collections;
using System.Data;
using System.IO;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Text;

using ms.aq.cview.util;

namespace ms.aq.cview.draw {
    class ColorTriangle {
        public HSVColor hsvc;
        private float R, G, B;
        public int r, g, b;

        public ColorTriangle() {
            hsvc = new HSVColor();
            hsvc.H = 155;
            hsvc.S = .75f;
            hsvc.V = .75f;
        }
        public void Next() {
            hsvc.H = (hsvc.H + 67) % 360;
            HSVConverter.HSVtoRGB(out R, out G, out B, hsvc.H, hsvc.S, hsvc.V);
            r = (int)R;
            g = (int)G;
            b = (int)B;
        }
        public void DarkenLast(out int rr, out int gg, out int bb){
            hsvc.V = .2f;
            HSVConverter.HSVtoRGB(out R, out G, out B, hsvc.H, hsvc.S, hsvc.V);
            rr = (int)R;
            gg = (int)G;
            bb= (int)B;
        }
    }
    public class ColorLine {
        ColorTriangle triangle;
        public ColorLine() {
            triangle = new ColorTriangle();
        }
        public void newColor(out int R, out int G, out int B) {
            triangle.Next();
            R = triangle.r;
            G = triangle.g;
            B = triangle.b;
        }
        public void DarkenLast(out int R, out int G, out int B){
            triangle.DarkenLast(out R, out G, out B);
        }
    }
}