public void Execute() { GenericShape newForm = shapeContainer.shapes[newShapeIndex]; //Point width = Math.Abs(newForm.position.X- start); //Point height = Math.Abs(newForm.position.Y - end); pencil = new Pencil(start, end, newShapeIndex, brush); newForm.Shape = pencil.Shape; shapeContainer.UpdateShape(newForm, newShapeIndex); }
public void Execute() { GenericShape newForm = new GenericShape(); pencil = new Pencil(start, end, newShapeIndex, brush); newForm.Shape = pencil.Shape; //newForm.position = new Point(start, end); newForm.ShapeTyp = GenericShape.type.Pencil; shapeContainer.shapes.Add(newShapeIndex, newForm); }