Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
xdot.h File Reference

parsing and deparsing of xdot operations More...

#include <stddef.h>
#include <stdio.h>
Include dependency graph for xdot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xdot_color_stop
 
struct  xdot_linear_grad
 
struct  xdot_radial_grad
 
struct  xdot_color
 
struct  xdot_point
 
struct  xdot_rect
 
struct  xdot_polyline
 
struct  xdot_text
 
struct  xdot_image
 
struct  xdot_font
 
struct  _xdot_op
 
struct  xdot
 
struct  xdot_stats
 

Macros

#define XDOT_PARSE_ERROR   1
 

Typedefs

typedef struct _xdot_op xdot_op
 
typedef void(* drawfunc_t) (xdot_op *, int)
 
typedef void(* freefunc_t) (xdot_op *)
 

Enumerations

enum  xdot_grad_type { xd_none , xd_linear , xd_radial }
 
enum  xdot_align { xd_left , xd_center , xd_right }
 
enum  xdot_kind {
  xd_filled_ellipse , xd_unfilled_ellipse , xd_filled_polygon , xd_unfilled_polygon ,
  xd_filled_bezier , xd_unfilled_bezier , xd_polyline , xd_text ,
  xd_fill_color , xd_pen_color , xd_font , xd_style ,
  xd_image , xd_grad_fill_color , xd_grad_pen_color , xd_fontchar
}
 
enum  xop_kind {
  xop_ellipse , xop_polygon , xop_bezier , xop_polyline ,
  xop_text , xop_fill_color , xop_pen_color , xop_font ,
  xop_style , xop_image , xop_grad_color , xop_fontchar
}
 

Functions

xdotparseXDotF (char *, drawfunc_t opfns[], size_t sz)
 
xdotparseXDotFOn (char *, drawfunc_t opfns[], size_t sz, xdot *)
 
xdotparseXDot (char *)
 
char * sprintXDot (xdot *)
 
void fprintXDot (FILE *, xdot *)
 
void jsonXDot (FILE *, xdot *)
 
void freeXDot (xdot *)
 
int statXDot (xdot *, xdot_stats *)
 
xdot_grad_type colorTypeXDot (char *)
 
char * parseXDotColor (char *cp, xdot_color *clr)
 
void freeXDotColor (xdot_color *)
 

Detailed Description

libxdot provides support for parsing and deparsing graphical operations specified by the xdot language. xdot is extended dot format containing complete layout information.

man 3 xdot

Definition in file xdot.h.

Macro Definition Documentation

◆ XDOT_PARSE_ERROR

#define XDOT_PARSE_ERROR   1

Definition at line 153 of file xdot.h.

Typedef Documentation

◆ drawfunc_t

typedef void(* drawfunc_t) (xdot_op *, int)

Definition at line 132 of file xdot.h.

◆ freefunc_t

typedef void(* freefunc_t) (xdot_op *)

Definition at line 133 of file xdot.h.

◆ xdot_op

typedef struct _xdot_op xdot_op

Definition at line 131 of file xdot.h.

Enumeration Type Documentation

◆ xdot_align

enum xdot_align
Enumerator
xd_left 
xd_center 
xd_right 

Definition at line 77 of file xdot.h.

◆ xdot_grad_type

Enumerator
xd_none 
xd_linear 
xd_radial 

Definition at line 43 of file xdot.h.

◆ xdot_kind

enum xdot_kind
Enumerator
xd_filled_ellipse 
xd_unfilled_ellipse 
xd_filled_polygon 
xd_unfilled_polygon 
xd_filled_bezier 
xd_unfilled_bezier 
xd_polyline 
xd_text 
xd_fill_color 
xd_pen_color 
xd_font 
xd_style 
xd_image 
xd_grad_fill_color 
xd_grad_pen_color 
xd_fontchar 

Definition at line 111 of file xdot.h.

◆ xop_kind

enum xop_kind
Enumerator
xop_ellipse 
xop_polygon 
xop_bezier 
xop_polyline 
xop_text 
xop_fill_color 
xop_pen_color 
xop_font 
xop_style 
xop_image 
xop_grad_color 
xop_fontchar 

Definition at line 121 of file xdot.h.

Function Documentation

◆ colorTypeXDot()

xdot_grad_type colorTypeXDot ( char *  )

◆ fprintXDot()

void fprintXDot ( FILE *  fp,
xdot x 
)

Definition at line 731 of file xdot.c.

References _printXDot(), and printXDot_Op().

Here is the call graph for this function:

◆ freeXDot()

void freeXDot ( xdot x)

Definition at line 782 of file xdot.c.

References xdot::cnt, free(), xdot::freefunc, freeXOpData(), xdot::ops, and xdot::sz.

Referenced by edge_spline(), edge_xdot(), graph_cleanup(), renderNodes(), renderSelectedEdges(), renderSelectedNodes(), and write_xdots().

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

◆ freeXDotColor()

void freeXDotColor ( xdot_color cp)

Definition at line 974 of file xdot.c.

References xdot_color_stop::color, free(), xdot_color::ling, xdot_linear_grad::n_stops, xdot_radial_grad::n_stops, xdot_color::ring, xdot_linear_grad::stops, xdot_radial_grad::stops, xdot_color::type, xdot_color::u, xd_linear, and xd_radial.

Referenced by freeXOpData().

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

◆ jsonXDot()

void jsonXDot ( FILE *  fp,
xdot x 
)

Definition at line 736 of file xdot.c.

References _printXDot(), and jsonXDot_Op().

Here is the call graph for this function:

◆ parseXDot()

xdot * parseXDot ( char *  s)

Definition at line 400 of file xdot.c.

References parseXDotF().

Referenced by write_xdots().

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

◆ parseXDotColor()

char * parseXDotColor ( char *  cp,
xdot_color clr 
)

Definition at line 946 of file xdot.c.

References xdot_color::clr, gv_isalnum(), linGradient(), NULL, radGradient(), xdot_color::type, xdot_color::u, and xd_none.

Referenced by parseOp().

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

◆ parseXDotF()

xdot * parseXDotF ( char *  s,
drawfunc_t  opfns[],
size_t  sz 
)

Definition at line 396 of file xdot.c.

References NULL, and parseXDotFOn().

Referenced by init_xdot(), and parseXDot().

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

◆ parseXDotFOn()

xdot * parseXDotFOn ( char *  s,
drawfunc_t  opfns[],
size_t  sz,
xdot x 
)

Definition at line 343 of file xdot.c.

References xdot::cnt, error(), xdot::flags, free(), gv_alloc(), gv_calloc(), gv_recalloc(), NULL, ops, xdot::ops, parseOp(), xdot::sz, XDBSIZE, and XDOT_PARSE_ERROR.

Referenced by parseXDotF(), and parseXdotwithattrs().

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

◆ sprintXDot()

char * sprintXDot ( xdot x)

Definition at line 724 of file xdot.c.

References _printXDot(), agxbdisown(), agxbprint(), and printXDot_Op().

Here is the call graph for this function:

◆ statXDot()