public MarkGeometryLine(netDxf.Entities.Line line) : base() { StartPoint = new MarkGeometryPoint(line.StartPoint); EndPoint = new MarkGeometryPoint(line.EndPoint); ReferencePoint = (MarkGeometryPoint)StartPoint.Clone(); Update(); }
public MarkGeometryLine(MarkGeometryPoint p1, MarkGeometryPoint p2) : base() { StartPoint = p1; EndPoint = p2; ReferencePoint = (MarkGeometryPoint)StartPoint.Clone(); Update(); }
public MarkGeometryLine(double x1, double y1, double z1, double x2, double y2, double z2) : base() { StartPoint = new MarkGeometryPoint(x1, y1, z1); EndPoint = new MarkGeometryPoint(x2, y2, z2); ReferencePoint = (MarkGeometryPoint)StartPoint.Clone(); Update(); }
public void GenerateView() { 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); IsClosed = true; Points = new List <MarkGeometryPoint>() { TopLeftPoint, TopRightPoint, BottomRightPoint, BottomLeftPoint, (MarkGeometryPoint)TopLeftPoint.Clone() }; }