public override int Execute(String[] parameters) { if (!this.Validate(parameters)) { return(-1); } base.BaseCanvas = new Canvas(Int32.Parse(parameters[0]), Int32.Parse(parameters[1])); BaseCanvas.PrintCanvas(); return(0); }
public override int Execute(String[] parameters) { if (!this.Validate(parameters)) { return(-1); } Point p = new Point(Int32.Parse(parameters[0]), Int32.Parse(parameters[1])); IShape fill = new Fill(p, (byte)(parameters[2])[0]); BaseCanvas.AddShape(fill); BaseCanvas.PrintCanvas(); return(0); }
public override int Execute(String[] parameters) { if (!this.Validate(parameters)) { return(-1); } Point p3 = new Point(Int32.Parse(parameters[0]), Int32.Parse(parameters[1])); Point p4 = new Point(Int32.Parse(parameters[2]), Int32.Parse(parameters[3])); IShape rectangle = new Rectangle(p3, p4); BaseCanvas.AddShape(rectangle); BaseCanvas.PrintCanvas(); return(0); }
public override int Execute(String[] parameters) { if (!this.Validate(parameters)) { return(-1); } Point p1 = new Point(Int32.Parse(parameters[0]), Int32.Parse(parameters[1])); Point p2 = new Point(Int32.Parse(parameters[2]), Int32.Parse(parameters[3])); IShape line = new Line(p1, p2); BaseCanvas.AddShape(line); BaseCanvas.PrintCanvas(); return(0); }