Example #1
0
        protected virtual AstVisitorDotGraph InitGraph()
        {
            var graph = new AstVisitorDotGraph();

            graph
            .SetFontName("Consolas")
            .SetStyleRadial()
            .SetGradientAngle(45)
            //.SetSplines(DotSplines.Polyline)
            //.SetBackgroundColor(DotColorScheme.Blues[9][7], DotColorScheme.Blues[9][8]);
            .SetBackgroundColor(DotColorScheme.Ylgn[9][1], DotColorScheme.Ylgn[9][2]);

            graph
            .AddNodeDefaults()
            .SetFontName("Consolas")
            .SetFillColor(Color.White.ToDotRgbColor())
            .SetShape(DotNodeShape.Rectangle)
            .SetStyle(DotNodeStyle.Bold, DotNodeStyle.Rounded, DotNodeStyle.Filled);

            graph
            .AddEdgeDefaults()
            .SetHeadPort(DotCompass.Center)
            .SetTailPort(DotCompass.Center)
            .SetPenWidth(2)
            .SetArrowHead(DotArrowType.Vee)
            .SetArrowTail(DotArrowType.Crow)
            .SetColor(DotColor.ColorList(DotColorScheme.Ylgn[9][7], DotColorScheme.Ylgn[9][2], DotColorScheme.Ylgn[9][7]));
            //.SetColor(DotColor.ColorList(Color.DarkGreen, Color.DarkSeaGreen, Color.DarkGreen));
            //.SetColor(DotColor.Rgb(Color.LawnGreen));

            graph
            .AddSubGraphDefaults()
            .SetStyle(DotClusterStyle.Bold, DotClusterStyle.Rounded)
            .SetColor(Color.White.ToDotRgbColor())
            .SetFontColor(Color.White.ToDotRgbColor())
            .SetPenWidth(2);

            return(graph);
        }
Example #2
0
        protected override AstVisitorDotGraph InitGraph()
        {
            var graph = new AstVisitorDotGraph();

            graph
            .SetFontName("Consolas")
            .SetStyleRadial()
            .SetGradientAngle(45)
            .SetBackgroundColor(Color.Wheat.ToDotRgbColor(), Color.BurlyWood.ToDotRgbColor())
            .SetSplines(DotSplines.Line);
            //.SetBackgroundColor(DotColorScheme.Blues[9][7], DotColorScheme.Blues[9][8]);

            graph
            .AddNodeDefaults()
            .SetFontName("Consolas")
            .SetStyle(DotNodeStyle.Filled)
            .SetFillColor(Color.White.ToDotRgbColor())
            .SetShape(DotNodeShape.Point)
            .SetLabel("");

            graph
            .AddEdgeDefaults()
            .SetHeadPort(DotCompass.Center)
            .SetTailPort(DotCompass.Center)
            //.SetPenWdith(2)
            .SetArrowHead(DotArrowType.Diamond)
            .SetArrowSize(0.5f)
            .SetColor(Color.Green.ToDotRgbColor());
            //.SetColor(DotColor.Rgb(Color.LawnGreen));

            graph
            .AddSubGraphDefaults()
            .SetStyle(DotClusterStyle.Bold, DotClusterStyle.Rounded)
            .SetColor(Color.White.ToDotRgbColor())
            .SetFontColor(Color.White.ToDotRgbColor());
            //.SetPenWidth(2);

            return(graph);
        }