Beispiel #1
0
        public void CreateSVGTransformFromMatrix(SVGMatrix matrix)
        {
            SVGTransform tr = new SVGTransform();

            tr.setMatrix(matrix);
            _transformList.Add(tr);
        }
Beispiel #2
0
        public void ParseAttributes(string attrs)
        {
            Debug.Log(this.ToString() + ": ParseAttributes: " + attrs);
            List <KeyValuePair <string, string> > dic = StringParser.StringAttrTransform(attrs);

            foreach (KeyValuePair <string, string> keypar in dic)
            {
                SVGTransform tr = new SVGTransform();
                tr.TransformParseAttr(keypar.Key, keypar.Value);
                _transformList.Add(tr);
            }
        }
Beispiel #3
0
        public SVGTransform Consolidate()
        {
            if (_transformList.Count == 0)
            {
                return(null);
            }
            SVGMatrix new_matrix = new SVGMatrix();

            for (int index = 0; index < _transformList.Count; index++)
            {
                new_matrix.Multiply(_transformList[index].Matrix);
            }
            _transformList.Clear();
            SVGTransform newTr = new SVGTransform();

            newTr.setMatrix(new_matrix);
            _transformList.Add(new SVGTransform());

            return(newTr);
        }
Beispiel #4
0
 public void AppendItem(SVGTransform newItem)
 {
     _transformList.Add(newItem);
 }
Beispiel #5
0
 public void ReplaceItem(SVGTransform newItem, int index)
 {
     _transformList.RemoveAt(index);
     _transformList.Insert(index, newItem);
 }
Beispiel #6
0
 public void InsertItemBefore(SVGTransform newItem, int index)
 {
     _transformList.Insert(index, newItem);
 }
Beispiel #7
0
 public void Initialize(SVGTransform newItem)
 {
     clear();
     _transformList.Add(newItem);
 }