Пример #1
0
 public Node(Guid guid, double width, double height, double x, double y, Graph ownerGraph)
 {
     Id = guid;
     Width = width;
     Height = height;
     X = x;
     Y = y;
     OwnerGraph = ownerGraph;
 }
Пример #2
0
        public Edge(Guid startId, Guid endId, double startX, double startY, double endX, double endY, Graph ownerGraph)
        {
            StartX = startX;
            StartY = startY;
            EndX = endX;
            EndY = endY;
            OwnerGraph = ownerGraph;

            StartNode = OwnerGraph.FindNode(startId);
            if (StartNode != null)
            {
                StartNode.RightEdges.Add(this);
            }

            EndNode = OwnerGraph.FindNode(endId);
            if (EndNode != null)
            {
                EndNode.LeftEdges.Add(this);
            }

            StartOffsetY = startY - StartNode.Y;
            EndOffsetY = endY - EndNode.Y;
        }
Пример #3
0
 public Node(Guid guid, double width, double height, double x, double y, bool isSelected, Graph ownerGraph)
 {
     Id = guid;
     Width = width;
     Height = height;
     X = x;
     Y = y;
     InitialY = y;
     IsSelected = isSelected;
     OwnerGraph = ownerGraph;
     NotesWidth = 0;
     NotesHeight = 0;
 }