示例#1
0
 public Circle(int x, int y, int r, ColorSVG color)
 {
     this.x     = x;
     this.y     = y;
     this.r     = r;
     this.color = color;
 }
示例#2
0
 public Line(int x1, int y1, int x2, int y2, ColorSVG color)
 {
     this.x1    = x1;
     this.x2    = x2;
     this.y1    = y1;
     this.y2    = y2;
     this.color = color;
 }
示例#3
0
文件: Menu.cs 项目: szafikbb/ProSVG
        private void AddCircle()
        {
            Console.WriteLine("Podaj współrzędną x1 koła.");
            int x = int.Parse(Console.ReadLine());

            Console.WriteLine("Podaj współrzędną y1 koła.");
            int y = int.Parse(Console.ReadLine());

            Console.WriteLine("Podaj promień koła.");
            int      r     = int.Parse(Console.ReadLine());
            ColorSVG color = GetColor();

            img.AddElement(new Circle(x, y, r, color));
        }
示例#4
0
文件: Menu.cs 项目: szafikbb/ProSVG
        private void AddLine()
        {
            Console.WriteLine("Podaj współrzędną x1 linii.");
            int x1 = int.Parse(Console.ReadLine());

            Console.WriteLine("Podaj współrzędną y1 linii.");
            int y1 = int.Parse(Console.ReadLine());

            Console.WriteLine("Podaj współrzędną x2 linii.");
            int x2 = int.Parse(Console.ReadLine());

            Console.WriteLine("Podaj współrzędną y2 linii.");
            int      y2    = int.Parse(Console.ReadLine());
            ColorSVG color = GetColor();

            img.AddElement(new Line(x1, y1, x2, y2, color));
        }