//ライセンス情報はAgeOnフォルダのLISENCEフォルダを参照してください
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Drawing;
using System.Xml.Linq;

namespace nispi.OptionControl
{
    partial class OutWardMap
    {
        private Bitmap MakeGradationImage(byte red, byte green, byte blue, string type)
        {
            Bitmap image = new Bitmap(200, 25);
            Brush brush = null;
            Pen pen = null;

            Graphics g = Graphics.FromImage(image);
            
            for (int num = image.Width; num != 0; num -= 1)
            {
                if (type.Equals("Red") == true)
                    brush = new SolidBrush(Color.FromArgb(num, green, blue));
                else if (type.Equals("Green") == true)
                    brush = new SolidBrush(Color.FromArgb(red, num, blue));
                else
                    brush = new SolidBrush(Color.FromArgb(red, green, num));

                pen = new Pen(brush);

                Point point1 = new Point(num,0);
                Point point2 = new Point(num,25);

                g.DrawLine(pen, point1, point2);

                pen.Dispose();
                brush.Dispose();
            }

            g.Dispose();

            return image;
        }

    }
}