예제 #1
0
        private static void generarImagen(ParseTreeNode raiz)
        {
            String grafoDOT = Graficas.Grafica.getDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            img.Save("AST.png");
        }
예제 #2
0
        public static void generarImagen(ParseTreeNode raiz)
        {
            String grafoDOT = controlDOT.getDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            img.Save("grafo.png");
        }
예제 #3
0
        private static void generarImagen(ParseTreeNode raiz)
        {
            string grafoDOT = clases.diagramaDOT.getDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            img.Save("AST.png");
        }
예제 #4
0
        public static void generarImagen(ParseTreeNode raiz)
        {
            String grafoDOT = getDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            // MessageBox.Show(grafoDOT);
            //img.Save("C:\\Users\\ROBIN SALVATIERRA\\Dropbox\\OLC2\\OLC2_P1\\Proyecto1_200915428\\Proyecto1_200915428\\entradas\\robast.png");
            img.Save("robast.png");
        }
예제 #5
0
        private static void generarImagen2(ParseTreeNode raiz)
        {
            string grafoDOT = AST.diagramaDOT.getDOT(raiz);

            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDOT);
            String path = Directory.GetCurrentDirectory() + "\\AST.png";

            Console.Write(path);
            img.Save(path);
        }
예제 #6
0
        public static Image dibujarGrafo(String grafo_en_DOT)
        {
            WINGRAPHVIZLib.DOT         dot = new WINGRAPHVIZLib.DOT();
            WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafo_en_DOT);
            byte[]       imageBytes        = Convert.FromBase64String(img.ToBase64String());
            MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);

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

            return(imagen);
        }
예제 #7
0
        public static Image getImage(ParseTreeNode raiz)
        {
            String grafica = GenerarGrafica.GenerarEstructura(raiz);

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

            return(imagen);
        }
예제 #8
0
        public static void GraficarArbol(String filename, String path)
        {
            String text = File.ReadAllText(HttpContext.Current.Server.MapPath("~/Arbol.txt"));

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

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

            imagen.Save(HttpContext.Current.Server.MapPath("~/Arbol.png"));
        }