public byte[] RenderDot(Cgraph cgraph, OutputFormat format) { _ = GraphvizApi.GvLayout(Handle, cgraph.Handle, "dot"); _ = GraphvizApi.GvRenderData(Handle, cgraph.Handle, format.Value, out IntPtr result, out int length); byte[] image = new byte[length]; Marshal.Copy(result, image, 0, length); _ = GraphvizApi.GvFreeLayout(Handle, cgraph.Handle); return(image); }
public Graphviz() { Handle = new GraphvizHandle(GraphvizApi.GvContext()); }
protected override bool ReleaseHandle() { _ = GraphvizApi.GvFreeContext(handle); return(true); }