public static void dibujarGrafo(ParseTreeNode raiz)
        {
            String arbol = Graficar_Arbol.obtenerDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(arbol);
            img.Save("C:\\Users\\Fernando\\Documents\\ASTLUP.png");
        }
Exemplo n.º 2
0
        private static void generarImagen(ParseTreeNode raiz)
        {
            String grafoDOT = ControlDOT.getDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            img.Save("AST.png");
        }
        public static void generarImagen(ParseTreeNode raiz)
        {
            String grafoDot = ControlDot2.getDot(raiz);

            //Console.WriteLine(grafoDot);
            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDot);
            img.Save("AST2.png");
        }
Exemplo n.º 4
0
        public static void generate_image(ParseTreeNode root)
        {
            String dot_Graph = Graphviz.DOT_Control.getDot(root);

            Console.WriteLine(dot_Graph);
            WINGRAPHVIZLib.DOT         dot_new = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img_new = dot_new.ToPNG(dot_Graph);
            img_new.Save("AST.png");
        }
Exemplo n.º 5
0
        public static Image getImage(ParseTreeNode raiz)
        {
            String grafoDOT = ControlDOT.getDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            byte[]       imageBytes        = Convert.FromBase64String(img.ToBase64String());
            MemoryStream ms     = new MemoryStream(imageBytes, 0, imageBytes.Length);
            Image        imagen = Image.FromStream(ms, true);

            return(imagen);
        }
Exemplo n.º 6
0
        /****************************************************************************
        ****************     GENERAR ÁRBOL DE SINTÁXIS ABSTRACTA     ***************
        ****************************************************************************/
        public static void GenerarImagen(ParseTreeNode raiz)
        {
            string nombre = "AST-";

            nombre += System.DateTime.Now.Minute.ToString();
            nombre += ".png";
            string grafoDOT = Archivos.ControlDOT.GetDot(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            img.Save(nombre);
        }
Exemplo n.º 7
0
        private static Image generarImagen(String grafico)
        {
            //  String graph = DOT();



            WINGRAPHVIZLib.DOT dot = new WINGRAPHVIZLib.DOT();

            WINGRAPHVIZLib.BinaryImage img = dot.ToJPEG(grafico);
            byte[]       imageBytes        = Convert.FromBase64String(img.ToBase64String());
            MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);

            ms.Write(imageBytes, 0, imageBytes.Length);
            Image image = Image.FromStream(ms, true);

            img.Save(@"C:\\Users\PC\\Desktop\\thompson.jpg");
            return(image);
        }
Exemplo n.º 8
0
 private void Graficar(string grafoDot, string path)
 {
     WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
     WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDot);
     img.Save(path);
 }