SvgMatrix.cs 1 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing.Drawing2D;

namespace Svg.Transforms
{
	/// <summary>
	/// The class which applies custom transform to this Matrix (Required for projects created by the Inkscape).
	/// </summary>
    public sealed class SvgMatrix : SvgTransform
    {
    	private List<float> points;

        public List<float> Points
        {
            get { return this.points; }
            set { this.points = value; }
        }

        public override System.Drawing.Drawing2D.Matrix Matrix
        {
            get
            {
            	Matrix matrix = new Matrix(
            		this.points[0],
            		this.points[1],
            		this.points[2],
            		this.points[3],
            		this.points[4],
            		this.points[5]
            	);
                return matrix;
            }
        }

        public SvgMatrix(List<float> m)
        {
        	this.points = m;
        }
    }
}