Пример #1
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 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");
        }
        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");
        }
Пример #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");
        }
Пример #5
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);
        }
Пример #6
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);
        }
Пример #7
0
 private void Graficar(string grafoDot, string path)
 {
     WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
     WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDot);
     img.Save(path);
 }