AutoPatientInfoRecorder/src/AntdUI/Lib/SVG/Transforms/SvgMatrix.cs

(完整代码) 1KB

// THIS FILE IS PART OF SVG PROJECT
// THE SVG PROJECT IS AN OPENSOURCE LIBRARY LICENSED UNDER THE MS-PL License.
// COPYRIGHT (C) svg-net. ALL RIGHTS RESERVED.
// GITHUB: https://github.com/svg-net/SVG

using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.Globalization;

namespace AntdUI.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 override string WriteToString()
        {
            return string.Format(CultureInfo.InvariantCulture, "matrix({0}, {1}, {2}, {3}, {4}, {5})",
                this.points[0], this.points[1], this.points[2], this.points[3], this.points[4], this.points[5]);
        }

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


        public override object Clone()
        {
            return new SvgMatrix(this.Points);
        }

    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。