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"); }
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"); }
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); }
/**************************************************************************** **************** 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); }
private void Graficar(string grafoDot, string path) { WINGRAPHVIZLib.DOT dot = new WINGRAPHVIZLib.DOT(); WINGRAPHVIZLib.BinaryImage img = dot.ToPNG(grafoDot); img.Save(path); }