示例#1
0
文件: Shape.cs 项目: physalis/MeeGen
 internal Shape()
 {
     this.position = new Point(0, 0);
     this.svgHandle = new Handle();
     this.size = new Size();
     this.size.Width = 0;
     this.size.Height = 0;
     this.zoom = 0;
     this.rotation = 0;
     this.selected = false;
     this.flipMode = FlipMode.None;
     this.svgContent = null;
     this.svgDoc = new XmlDocument();
 }
示例#2
0
 public void Export(string filename, ExportFormat format, Size size)
 {
     throw new NotImplementedException();
 }
示例#3
0
文件: Shape.cs 项目: physalis/MeeGen
        /// <summary>
        /// Creates a new instance of the MeeGen.Shape class
        /// </summary>
        /// <param name="handle">
        /// The Rsvg.Handle that contains the image data for this instance
        /// A <see cref="Handle"/>
        /// </param>
        /// <param name="pos">
        /// The starting position of the new shape
        /// A <see cref="Point"/>
        /// </param>
        public Shape(Handle handle, Point pos)
        {
            this.position = pos;

            this.svgHandle = handle;

            this.size = new Size(this.svgHandle.Dimensions.Width,
                                 this.svgHandle.Dimensions.Height);

            this.zoom = 1d;
            this.rotation = 0d;
            this.selected = false;

            this.flipMode = FlipMode.None;

            if(handle.BaseUri.Length > 0)
            {
                StreamReader reader = new StreamReader(handle.BaseUri.Substring(7));
                svgContent = reader.ReadToEnd();
                reader.Close();
            }

            this.svgDoc = new XmlDocument();
            svgDoc.LoadXml(svgContent);

            this.colorizeItems = this.ParseMetadata();
        }