public void Execute() { GenericShape newForm = shapeContainer.shapes[newShapeIndex]; double width = Math.Abs(newForm.position.X - posX); double height = Math.Abs(newForm.position.Y - posY); ellipse = new EllipseShape(newForm.position.X - 5, newForm.position.Y - 5, width, height, newShapeIndex, brush); }
public void Execute() { GenericShape newForm = new GenericShape(); ellipse = new EllipseShape(posX, posY, 0, 0, newShapeIndex, brush); newForm.Shape = ellipse.Shape; newForm.position = new Point(posX, posY); newForm.ShapeTyp = GenericShape.type.Ellipse; shapeContainer.shapes.Add(newShapeIndex, newForm); }
public void Execute() { Geometry geomerty = HitResult.Data; EllipseGeometry currentShape = geomerty as EllipseGeometry; GenericShape form = shapeContainer.shapes[newShapeIndex]; double width = 2*currentShape.RadiusX; double height = 2*currentShape.RadiusY; Ellipse = new EllipseShape(form.position.X + dX, form.position.Y + dY, width, height, newShapeIndex, brush); form.Shape = Ellipse.Shape; form.position = new Point(form.position.X + dX, form.position.Y + dY); shapeContainer.UpdateShape(form, newShapeIndex); }