using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing.Drawing2D; using System.Linq; using System.Text; namespace Svg.Transforms { [TypeConverter(typeof(SvgTransformConverter))] public class SvgTransformCollection : List { /// /// Multiplies all matrices /// /// The result of all transforms public Matrix GetMatrix() { var transformMatrix = new Matrix(); // Return if there are no transforms if (this.Count == 0) { return transformMatrix; } foreach (SvgTransform transformation in this) { transformMatrix.Multiply(transformation.Matrix); } return transformMatrix; } } }