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"); }
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"); }
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"); }
public static void getAST(ParseTreeNode raiz, String Nombre) { String grafoDOT = Graficar.arbolDOT.getDOT2(raiz); WINGRAPHVIZLib.DOT dot = new WINGRAPHVIZLib.DOT(); WINGRAPHVIZLib.BinaryImage img = dot.ToJPEG(grafoDOT); img.Save(Nombre); }
public static void getImage(ParseTreeNode raiz) { String grafoDOT = Graficar.arbolDOT.getDOT(raiz); WINGRAPHVIZLib.DOT dot = new WINGRAPHVIZLib.DOT(); WINGRAPHVIZLib.BinaryImage img = dot.ToJPEG(grafoDOT); img.Save("ast.jpeg"); }
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"); }
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); }
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); }
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); }
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")); }