コード例 #1
0
        public ConnectionPoint(GraphEntity node,
                               ConnectionPointDirection direction, Connection connection)
        {
            if (nodeGraph == null)
            {
                throw new System.Exception("ConnectionPoint.nodeGraph MUST be set!");
            }
            if (connection == null)
            {
                throw new System.Exception("Connection may not be null");
            }

            nodeWindow          = node;
            connectionDirection = direction;

            data = ConnectionPointData.GetControlPointData(connection.type);

            currentStyle = data.connectionPointStyle.unconnectedStyle;

            rect = new Rect(0, 0,
                            currentStyle.normal.background.width,
                            currentStyle.normal.background.height);

            GUID            = connection.GUID;
            this.connection = connection;

            nodeGraph.RefreshConnectionPoint(this);
        }
コード例 #2
0
 public void SetData(ConnectionPointData connectionPointData)
 {
     data = ConnectionPointData.GetControlPointData(connection.type);
     SetCurrentStyle();
     rect = new Rect(0, 0,
                     currentStyle.normal.background.width,
                     currentStyle.normal.background.height);
 }