Beispiel #1
0
        public MarkGeometryLine(netDxf.Entities.Line line)
            : base()
        {
            StartPoint     = new MarkGeometryPoint(line.StartPoint);
            EndPoint       = new MarkGeometryPoint(line.EndPoint);
            ReferencePoint = (MarkGeometryPoint)StartPoint.Clone();

            Update();
        }
Beispiel #2
0
        public MarkGeometryLine(MarkGeometryPoint p1, MarkGeometryPoint p2)
            : base()
        {
            StartPoint     = p1;
            EndPoint       = p2;
            ReferencePoint = (MarkGeometryPoint)StartPoint.Clone();

            Update();
        }
Beispiel #3
0
        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();
        }
Beispiel #4
0
        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()
            };
        }