예제 #1
0
        /// <summary>
        ///     This is the copy constructor
        /// </summary>
        /// <param name="input">The input to copy</param>
        internal MarkGeometryLine(MarkGeometryLine input)
            : base(input)
        {
            StartPoint     = (MarkGeometryPoint)input.StartPoint.Clone();
            EndPoint       = (MarkGeometryPoint)input.EndPoint.Clone();
            ReferencePoint = (MarkGeometryPoint)input.ReferencePoint.Clone();

            Update();
        }
예제 #2
0
        public MarkGeometryPath(MarkGeometryLine line)
            : base()
        {
            Points.Add(line.StartPoint);
            Points.Add(line.EndPoint);
            CentrePoint = line.GetMidpoint();

            IsClosed = false;
            Update();
        }
예제 #3
0
        public MarkGeometryRectangle(MarkGeometryPoint pointA, MarkGeometryPoint pointB)
            : base()
        {
            MarkGeometryRectangle rect = new MarkGeometryLine(pointA, pointB).Extents.Boundary;

            Points.AddRange(rect.Points);
            CentrePoint = rect.CentrePoint;
            Width       = rect.Width;
            Height      = rect.Height;
            IsClosed    = true;

            double halfWidth  = Width / 2.0;
            double halfHeight = Height / 2.0;

            TopLeftPoint     = new MarkGeometryPoint(CentrePoint.X - halfWidth, CentrePoint.Y + halfHeight);
            TopRightPoint    = new MarkGeometryPoint(CentrePoint.X + halfWidth, CentrePoint.Y + halfHeight);
            BottomLeftPoint  = new MarkGeometryPoint(CentrePoint.X - halfWidth, CentrePoint.Y - halfHeight);
            BottomRightPoint = new MarkGeometryPoint(CentrePoint.X + halfWidth, CentrePoint.Y - halfHeight);

            Update();
        }
예제 #4
0
 public void Add(MarkGeometryLine lines)
 {
     Lines.Add(lines);
     Update();
 }