コード例 #1
0
ファイル: Export XML.cs プロジェクト: ALPhaHoai/MyVegasScript
    void ExportEnvelopePoints(XmlElement parent, EnvelopePoints points)
    {
        XmlElement elt = AddChild(parent, "Points");

        elt.SetAttribute("Count", points.Count.ToString(myNumberFormat));
        foreach (EnvelopePoint point in points)
        {
            ExportEnvelopePoint(elt, point);
        }
    }
コード例 #2
0
    void ImportPoints(XmlElement parent, EnvelopePoints points)
    {
        XmlElement elt = parent["Points"];

        if (null == elt)
        {
            return;
        }
        foreach (XmlElement child in elt)
        {
            ImportPoint(child, points);
        }
    }
コード例 #3
0
    void ImportPoint(XmlElement elt, EnvelopePoints points)
    {
        Timecode      x     = AttributeTimecode(elt, "X");
        Double        y     = AttributeDouble(elt, "Y");
        CurveType     curve = AttributeCurveType(elt, "Curve");
        EnvelopePoint point = points.GetPointAtX(x);

        if (null == point)
        {
            point = new EnvelopePoint(x, y, curve);
            points.Add(point);
        }
        else
        {
            point.Y     = y;
            point.Curve = curve;
        }
    }