Beispiel #1
0
        public XEdge(Edge edge, string category=null)
        {
            Edge = edge;
            _category = category;
            _strokePathThickness = edge.Attr.LineWidth;

            if (edge.Label != null)
            {
                XLabel label = new XLabel(edge);
                this.XLabel = label;
                _visualObject = label.VisualObject;
            }

            Path = new Path
            {
                Stroke = CommonX.BrushFromMsaglColor(edge.Attr.Color),
                StrokeThickness = _strokePathThickness,
                StrokeDashArray = EdgeCategories.GetDashArray(category),
                Tag = this
            };
        }