예제 #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));
        }