Ejemplo n.º 1
0
        protected void drawMap()
        {
            buffer.Clear(panel1.BackColor);

            IPosition_Connected_Edit adj;

            //先画节点间连接,再画节点,让节点覆盖在连接上,看起来比较清晰
            foreach (IPosition_Connected_Edit p in map.GetPositionList())
            {
                IPositionSet_Connected_AdjacencyEdit adjSet = p.GetAdjacencyPositionSetEdit();
                adjSet.InitToTraverseSet();
                while (adjSet.NextPosition())
                {
                    adj = adjSet.GetPosition_Connected_Edit();
                    drawConnection(linePen, p.GetX(), p.GetY(), adj.GetX(), adj.GetY());
                }
            }
            foreach (IPosition_Connected_Edit p in map.GetPositionList())
            {
                drawNode(p.GetX(), p.GetY());
            }

            refreshTags();
        }