예제 #1
0
    public static void AddNew(SVG SVG, Shape parent)
    {
        IElement element = SVG.Document.CreateElement("ANIMATE");

        AnimateFill animate = new(element, SVG)
        {
            AttributeName = "fill",
            Parent        = parent,
            Values        = new(),
            Begin         = 0,
            Dur           = 5,
        };

        animate.AddFrame();
        animate.UpdateValues();
        SVG.EditMode = EditMode.None;
        SVG.SelectedShapes.Clear();

        SVG.AddElement(animate, parent);
        parent.AnimationElements.Add(animate);
    }