Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
output.c File Reference
#include <common/render.h>
#include <cgraph/agxbuf.h>
#include <cgraph/prisize_t.h>
#include <gvc/gvc.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
Include dependency graph for output.c:

Go to the source code of this file.

Macros

#define YDIR(y)   (Y_invert ? (Y_off - (y)) : (y))
 
#define YFDIR(y)   (Y_invert ? (YF_off - (y)) : (y))
 

Functions

double yDir (double y)
 
static void agputs (int(*putstr)(void *chan, const char *str), const char *s, FILE *fp)
 
static void agputc (int(*putstr)(void *chan, const char *str), char c, FILE *fp)
 
static void printstring (int(*putstr)(void *chan, const char *str), FILE *f, char *prefix, char *s)
 
static void printint (int(*putstr)(void *chan, const char *str), FILE *f, char *prefix, size_t i)
 
static void printdouble (int(*putstr)(void *chan, const char *str), FILE *f, char *prefix, double v)
 
static void printpoint (int(*putstr)(void *chan, const char *str), FILE *f, pointf p)
 
static void setYInvert (graph_t *g)
 
static char * canon (graph_t *g, char *s)
 
static void writenodeandport (int(*putstr)(void *chan, const char *str), FILE *f, node_t *node, char *portname)
 
void write_plain (GVJ_t *job, graph_t *g, FILE *f, bool extend)
 
static void set_record_rects (node_t *n, field_t *f, agxbuf *xb)
 
static void rec_attach_bb (graph_t *g, Agsym_t *bbsym, Agsym_t *lpsym, Agsym_t *lwsym, Agsym_t *lhsym)
 
void attach_attrs_and_arrows (graph_t *g, bool *sp, bool *ep)
 
void attach_attrs (graph_t *g)
 

Variables

static double Y_off
 
static double YF_off
 

Macro Definition Documentation

◆ YDIR

#define YDIR (   y)    (Y_invert ? (Y_off - (y)) : (y))

Definition at line 22 of file output.c.

◆ YFDIR

#define YFDIR (   y)    (Y_invert ? (YF_off - (y)) : (y))

Definition at line 23 of file output.c.

Function Documentation

◆ agputc()

static void agputc ( int(*)(void *chan, const char *str putstr,
char  c,
FILE *  fp 
)
static

Definition at line 38 of file output.c.

Referenced by write_plain().

Here is the caller graph for this function:

◆ agputs()

static void agputs ( int(*)(void *chan, const char *str putstr,
const char *  s,
FILE *  fp 
)
static

Definition at line 33 of file output.c.

Referenced by printdouble(), printint(), printstring(), and write_plain().

Here is the caller graph for this function:

◆ attach_attrs_and_arrows()

void attach_attrs_and_arrows ( graph_t g,
bool *  sp,
bool *  ep 
)

Definition at line 229 of file output.c.

References AGEDGE, agfstnode(), agfstout(), agget(), AGNODE, agnxtnode(), agnxtout(), AGRAPH, agset(), agxbfree(), agxbpop(), agxbprint(), agxbputc(), agxbuse(), agxset(), ED_edge_type, ED_head_label, ED_label, ED_spl, ED_tail_label, ED_xlabel, EDGE_LABEL, EDGE_XLABEL, GD_has_labels, GD_odim, GRAPH_LABEL, gv_fixLocale(), GVSPLINES, HAS_CLUST_EDGE, HEAD_LABEL, IGNORED, isPolygon(), M_PI, N_height, N_vertices, N_width, ND_coord, ND_height, ND_ht, ND_lw, ND_pos, ND_rw, ND_shape, ND_shape_info, ND_width, ND_xlabel, NODE_XLABEL, NULL, POINTS_PER_INCH, PS2INCH, rec_attach_bb(), safe_dcl(), set_record_rects(), setYInvert(), State, TAIL_LABEL, undoClusterEdges(), pointf_s::x, pointf_s::y, YDIR, and YFDIR.

Referenced by attach_attrs(), and dot_begin_graph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ canon()

static char * canon ( graph_t g,
char *  s 
)
static

Definition at line 94 of file output.c.

References agcanonStr(), agstrdup(), and agstrfree().

Referenced by canontoken(), colorxlate(), colorxlate(), getval(), write_plain(), and writenodeandport().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printdouble()

static void printdouble ( int(*)(void *chan, const char *str putstr,
FILE *  f,
char *  prefix,
double  v 
)
static

Definition at line 61 of file output.c.

References agputs(), agxbfree(), agxbprint(), agxbuse(), and prefix.

Referenced by printpoint(), and write_plain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printint()

static void printint ( int(*)(void *chan, const char *str putstr,
FILE *  f,
char *  prefix,
size_t  i 
)
static

Definition at line 51 of file output.c.

References agputs(), agxbfree(), agxbprint(), agxbuse(), prefix, and PRISIZE_T.

Referenced by write_plain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printpoint()

static void printpoint ( int(*)(void *chan, const char *str putstr,
FILE *  f,
pointf  p 
)
static

Definition at line 71 of file output.c.

References printdouble(), PS2INCH, pointf_s::x, pointf_s::y, and YDIR.

Referenced by write_plain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printstring()

static void printstring ( int(*)(void *chan, const char *str putstr,
FILE *  f,
char *  prefix,
char *  s 
)
static

Definition at line 45 of file output.c.

References agputs(), and prefix.

Referenced by write_plain(), and writenodeandport().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rec_attach_bb()

static void rec_attach_bb ( graph_t g,
Agsym_t bbsym,
Agsym_t lpsym,
Agsym_t lwsym,
Agsym_t lhsym 
)
static

Definition at line 205 of file output.c.

References agxbfree(), agxbprint(), agxbuse(), agxset(), GD_bb, GD_clust, GD_label, GD_n_cluster, PS2INCH, rec_attach_bb(), pointf_s::x, pointf_s::y, and YDIR.

Referenced by attach_attrs_and_arrows(), and rec_attach_bb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_record_rects()

static void set_record_rects ( node_t n,
field_t f,
agxbuf xb 
)
static

Definition at line 190 of file output.c.

References agxbprint(), field_t::b, field_t::fld, boxf::LL, field_t::n_flds, ND_coord, set_record_rects(), boxf::UR, pointf_s::x, pointf_s::y, and YDIR.

Referenced by attach_attrs_and_arrows(), and set_record_rects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setYInvert()

static void setYInvert ( graph_t g)
static

Definition at line 83 of file output.c.

References GD_bb, PS2INCH, Y_invert, Y_off, and YF_off.

Referenced by attach_attrs_and_arrows(), and write_plain().

Here is the caller graph for this function:

◆ write_plain()

void write_plain ( GVJ_t job,
graph_t g,
FILE *  f,
bool  extend 
)

Definition at line 114 of file output.c.

References agcanonStr(), agfstnode(), agfstout(), agget(), aghead, agnameof(), agnxtnode(), agnxtout(), agputc(), agputs(), agraphof(), agtail, agxget(), canon(), Agraph_s::clos, DEFAULT_COLOR, DEFAULT_FILL, Agclos_s::disc, E_color, E_style, ED_label, ED_spl, GD_bb, Agdisc_s::io, IS_CLUST_NODE, late_nnstring(), lbl, bezier::list, N_color, N_fillcolor, N_label, N_style, ND_coord, ND_height, ND_label, ND_shape, ND_width, NULL, printdouble(), printint(), printpoint(), printstring(), PS2INCH, Agiodisc_s::putstr, setYInvert(), bezier::size, str, writenodeandport(), pointf_s::x, pointf_s::y, and GVJ_s::zoom.

Referenced by dot_end_graph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writenodeandport()

static void writenodeandport ( int(*)(void *chan, const char *str putstr,
FILE *  f,
node_t node,
char *  portname 
)
static

Definition at line 102 of file output.c.

References agcanonStr(), agnameof(), agraphof(), canon(), IS_CLUST_NODE, and printstring().

Referenced by write_plain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yDir()

double yDir ( double  y)

Definition at line 28 of file output.c.

References YDIR.

Referenced by xdot_point().

Here is the caller graph for this function:

Variable Documentation

◆ Y_off

double Y_off
static

Definition at line 25 of file output.c.

Referenced by setYInvert().

◆ YF_off

double YF_off
static

Definition at line 26 of file output.c.

Referenced by setYInvert().