/// <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(); }
public MarkGeometryPath(MarkGeometryLine line) : base() { Points.Add(line.StartPoint); Points.Add(line.EndPoint); CentrePoint = line.GetMidpoint(); IsClosed = false; Update(); }
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(); }
public void Add(MarkGeometryLine lines) { Lines.Add(lines); Update(); }