LIBGVC(3)
πΈ LIBGVC(3) β the Graphviz context library π
ok so bestie, this is the libgvc manual page from section 3 of the Library Functions Manual, and honestly? it's the moment. this is the library that gives your app a whole β¨contextβ¨ for messing with graphs and rendering them. let's get into it π«Ά
β¨ NAME β¨
libgvc β the Graphviz context library π
π SYNOPSIS π
first things first, you gotta include it:
#include <graphviz/gvc.h>
then all the little functions, bestie, in order, exactly as they come:
/* set up a graphviz context */
extern GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading);
/* set up a graphviz context β alternative */
/* (wraps the above two functions using info built into libgvc) */
extern GVC_t *gvContext(void);
/* parse command line args β minimally argv[0] sets layout engine */
extern int gvParseArgs(GVC_t *gvc, int argc, char **argv);
extern graph_t *gvNextInputGraph(GVC_t *gvc);
/* Compute a layout using a specified engine */
extern int gvLayout(GVC_t *gvc, graph_t *g, char *engine);
/* Compute a layout using layout engine from command line args */
extern int gvLayoutJobs(GVC_t *gvc, graph_t *g);
/* Check if a layout has been done */
extern bool gvLayoutDone(graph_t *g);
/* Render layout into string attributes of the graph */
extern void attach_attrs(graph_t *g);
/* Parse an html string */
extern char *agstrdup_html(char *s);
extern int aghtmlstr(char *s);
/* Render layout in a specified format to an open FILE */
extern int gvRender(GVC_t *gvc, graph_t *g, char *format, FILE *out);
/* Render layout in a specified format to an open FILE */
extern int gvRenderFilename(GVC_t *gvc, graph_t *g, char *format, char *filename);
/* Render layout according to -T and -o options found by gvParseArgs */
extern int gvRenderJobs(GVC_t *gvc, graph_t *g);
/* Clean up layout data structures β layouts are not nestable (yet) */
extern int gvFreeLayout(GVC_t *gvc, graph_t *g);
/* Clean up graphviz context */
extern int gvFreeContext(GVC_t *gvc);
/* Inquire about available plugins */
/* See comment in gvc.h */
extern char** gvPluginList(GVC_t *gvc, char* kind, int* cnt, char*);
ngl, that's a lot of externs but every single one of them is iconic in its own way π
π DESCRIPTION π
ok so here's the tea: libgvc hands your app a whole context so it can manipulate graphs and render them. it's giving main character energy for graph tooling. it brings:
- command line parsing π
- common rendering code β¨
- and a whole plugin mechanism for renderers π§
literally everything you need to go from "i have a graph" to "i have a rendered graph", no cap.
π¦ SEE ALSO π¦
go read these too, bestie, they're all in the group chat:
π AUTHOR π
John Ellson (ellson@research.att.com), AT&T β we stan π«Ά
and that's the whole page, periodt. this was the LIBGVC(3) page from the Library Functions Manual, and yes the footer said LIBGVC(3) too because consistency is a vibe π mwah, go render something cute ππβ¨
π¦ where this page comes from
- arch rolling: graphviz 16.1.0-2 Β· EPL
- fedora 43: graphviz-devel 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz-devel 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz-devel 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz-devel 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz-devel 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz-devel 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz-devel 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz-devel 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- nixpkgs unstable: graphviz 15.1.1
- ubuntu resolute: libgraphviz-dev 14.1.2-1ubuntu1 Β· EPL-1.0
- ubuntu stonking: libgraphviz-dev 14.1.2-1ubuntu2 Β· EPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms