Graphviz
2.41.20171026.1811
|
#include "config.h"
#include <string.h>
#include <ctype.h>
#include <locale.h>
#include "render.h"
#include "agxbuf.h"
#include "htmltable.h"
#include "gvc.h"
#include "cdt.h"
#include "xdot.h"
Go to the source code of this file.
Data Structures | |
struct | exdot_op |
struct | colorseg_t |
struct | colorsegs_t |
struct | segitem_s |
Macros | |
#define | P2RECT(p, pr, sx, sy) (pr[0].x = p.x - sx, pr[0].y = p.y - sy, pr[1].x = p.x + sx, pr[1].y = p.y + sy) |
#define | FUZZ 3 |
#define | EPSILON .0001 |
#define | EPS 1E-5 |
#define | AEQ0(x) (((x) < EPS) && ((x) > -EPS)) |
#define | THIN_LINE 0.5 |
#define | HW 2.0 /* maximum distance away from line, in points */ |
#define | MARK_FIRST_SEG(L) ((L)->next = (segitem_t*)1) |
#define | FIRST_SEG(L) ((L)->next == (segitem_t*)1) |
#define | INIT_SEG(P, L) {(L)->next = 0; (L)->p = P;} |
#define | INITPTS 1000 |
#define | SEP 2.0 |
#define | NotFirstPage(j) (((j)->layerNum>1)||((j)->pagesArrayElem.x > 0)||((j)->pagesArrayElem.x > 0)) |
#define | SID 1 |
#define | FUNLIMIT 64 |
#define | FINISH() if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec()) |
Typedefs | |
typedef struct segitem_s | segitem_t |
typedef double(* | radfunc_t )(double, double, double) |
Functions | |
void * | init_xdot (Agraph_t *g) |
obj_state_t * | push_obj_state (GVJ_t *job) |
void | pop_obj_state (GVJ_t *job) |
int | initMapData (GVJ_t *job, char *lbl, char *url, char *tooltip, char *target, char *id, void *gobj) |
char * | getObjId (GVJ_t *job, void *obj, agxbuf *xb) |
int | wedgedEllipse (GVJ_t *job, pointf *pf, char *clrs) |
int | stripedBox (GVJ_t *job, pointf *AF, char *clrs, int rotate) |
void | emit_map_rect (GVJ_t *job, boxf b) |
void | update_bb_bz (boxf *bb, pointf *cp) |
boxf | xdotBB (Agraph_t *g) |
void | emit_graph (GVJ_t *job, graph_t *g) |
int | emit_once (char *str) |
void | emit_once_reset (void) |
void | emit_clusters (GVJ_t *job, Agraph_t *g, int flags) |
char ** | parse_style (char *s) |
void | gv_fixLocale (int set) |
int | gvRenderJobs (GVC_t *gvc, graph_t *g) |
boolean | findStopColor (char *colorlist, char *clrs[2], float *frac) |
Variables | |
gvevent_key_binding_t | gvevent_key_binding [] |
int | gvevent_key_binding_size |
gvdevice_callbacks_t | gvdevice_callbacks |
#define FINISH | ( | ) | if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec()) |
Definition at line 4092 of file emit.c.
Referenced by gvRenderJobs().
#define FUNLIMIT 64 |
Definition at line 3872 of file emit.c.
Referenced by parse_style().
#define HW 2.0 /* maximum distance away from line, in points */ |
#define NotFirstPage | ( | j | ) | (((j)->layerNum>1)||((j)->pagesArrayElem.x > 0)||((j)->pagesArrayElem.x > 0)) |
#define P2RECT | ( | p, | |
pr, | |||
sx, | |||
sy | |||
) | (pr[0].x = p.x - sx, pr[0].y = p.y - sy, pr[1].x = p.x + sx, pr[1].y = p.y + sy) |
#define SEP 2.0 |
#define THIN_LINE 0.5 |
Definition at line 561 of file emit.c.
Referenced by stripedBox(), and wedgedEllipse().
Definition at line 3660 of file emit.c.
References ag_xget, agerr(), agfstnode(), agfstout(), agget(), agnameof(), agnxtnode(), agnxtout(), AGPREV, DEFAULT_ACTIVEFILLCOLOR, DEFAULT_ACTIVEPENCOLOR, DEFAULT_COLOR, DEFAULT_DELETEDFILLCOLOR, DEFAULT_DELETEDPENCOLOR, DEFAULT_FILL, DEFAULT_SELECTEDFILLCOLOR, DEFAULT_SELECTEDPENCOLOR, DEFAULT_VISITEDFILLCOLOR, DEFAULT_VISITEDPENCOLOR, EMIT_CLABEL, emit_clusters(), emit_label(), emit_map_rect(), obj_state_s::explicit_tooltip, FALSE, FILL, FILLED, findStopColor(), G_activefillcolor, G_activepencolor, G_deletedfillcolor, G_deletedpencolor, G_gradientangle, G_penwidth, G_peripheries, G_visitedfillcolor, G_visitedpencolor, GD_bb, GD_clust, GD_gui_state, GD_label, GD_n_cluster, GRADIENT, gvrender_begin_anchor(), gvrender_box(), gvrender_end_anchor(), gvrender_set_fillcolor(), gvrender_set_gradient_vals(), gvrender_set_pencolor(), gvrender_set_penwidth(), gvrender_set_style(), obj_state_s::id, late_double(), late_int(), late_nnstring(), NULL, GVJ_s::obj, RADIAL, RGRADIENT, round_corners(), ROUNDED, setColorScheme(), STRIPED, stripedBox(), obj_state_s::target, obj_state_s::tooltip, TRUE, obj_state_s::url, pointf_s::x, and pointf_s::y.
Referenced by emit_clusters().
Definition at line 3545 of file emit.c.
References agattr(), agfstnode(), agnxtnode(), AGRAPH, GVJ_s::devscale, GVJ_s::dpi, EMIT_COLORS, GVJ_s::flags, GVJ_s::focus, gvrender_begin_layer(), gvrender_comment(), gvrender_end_layer(), GVRENDER_Y_GOES_DOWN, GVJ_s::height, late_string(), GVJ_s::layerNum, ND_state, POINTS_PER_INCH, GVJ_s::rotation, GVJ_s::scale, GVJ_s::view, GVJ_s::width, pointf_s::x, pointf_s::y, Y_invert, and GVJ_s::zoom.
Referenced by gvRenderJobs().
Definition at line 671 of file emit.c.
References GVJ_s::flags, GVRENDER_DOES_MAPS, GVRENDER_DOES_TOOLTIPS, gvrender_ptf_A(), boxf::LL, MAP_POLYGON, MAP_RECTANGLE, N_NEW, GVJ_s::obj, rect2poly(), boxf::UR, obj_state_s::url_map_n, obj_state_s::url_map_p, and obj_state_s::url_map_shape.
Referenced by emit_clusters().
int emit_once | ( | char * | str | ) |
void emit_once_reset | ( | void | ) |
boolean findStopColor | ( | char * | colorlist, |
char * | clrs[2], | ||
float * | frac | ||
) |
Definition at line 4223 of file emit.c.
References agerr(), AGWARN, colorseg_t::color, FALSE, colorseg_t::hasFraction, N_GNEW, NULL, colorsegs_t::numc, colorsegs_t::segs, colorseg_t::t, and TRUE.
Referenced by emit_clusters().
Definition at line 198 of file emit.c.
References AGEDGE, agget(), AGNODE, agobjkind(), AGRAPH, AGSEQ, agxbput(), agxbputc, agxbuse, GVC_s::g, GD_drawing, GVJ_s::gvc, and NULL.
void gv_fixLocale | ( | int | set | ) |
Definition at line 4070 of file emit.c.
References NULL.
Referenced by attach_attrs_and_arrows(), gvLayoutJobs(), and gvRenderJobs().
Definition at line 4094 of file emit.c.
References GVC_s::active_jobs, agerr(), AGERR, GVJ_s::callbacks, GVC_s::common, GVJ_s::common, DIA, emit_graph(), EMIT_SORTED, FINISH, GVJ_s::flags, GD_drawing, GVG_s::graph_index, GVJ_s::graph_index, gv_fixLocale(), GVDEVICE_BINARY_FORMAT, gvdevice_callbacks, GVDEVICE_DOES_PAGES, GVDEVICE_EVENTS, gvevent_key_binding, gvevent_key_binding_size, GVC_s::gvg, gvjobs_first(), gvjobs_next(), gvrender_begin_job(), gvrender_end_job(), gvrender_select(), GVG_s::input_filename, GVJ_s::input_filename, GVJ_s::keybindings, GVC_s::layout, LAYOUT_DONE, GVJ_s::layout_type, GVJ_s::next_active, NO_SUPPORT, NULL, GVJ_s::numkeys, GVJ_s::output_file, GVJ_s::output_lang, GVJ_s::output_langname, GVCOMMON_s::show_boxes, Show_boxes, start_timer(), gvplugin_active_layout_s::type, Verbose, GVCOMMON_s::viewNum, and VTX.
Referenced by graphcmd(), gvRender(), gvRenderContext(), gvRenderData(), gvRenderFilename(), and main().
void* init_xdot | ( | Agraph_t * | g | ) |
Definition at line 44 of file emit.c.
References agerr(), agget(), agnameof(), AGPREV, AGWARN, xdot_stats::cnt, elapsed_sec(), xdot_stats::n_bezier, xdot_stats::n_bezier_pts, xdot_stats::n_ellipse, xdot_stats::n_polygon, xdot_stats::n_polygon_pts, xdot_stats::n_polyline, xdot_stats::n_polyline_pts, xdot_stats::n_text, NULL, parseXDotF(), start_timer(), statXDot(), and Verbose.
Referenced by graph_init().
int initMapData | ( | GVJ_t * | job, |
char * | lbl, | ||
char * | url, | ||
char * | tooltip, | ||
char * | target, | ||
char * | id, | ||
void * | gobj | ||
) |
Definition at line 146 of file emit.c.
References obj_state_s::explicit_tooltip, GVJ_s::flags, GVRENDER_DOES_LABELS, GVRENDER_DOES_MAPS, GVRENDER_DOES_TARGETS, GVRENDER_DOES_TOOLTIPS, obj_state_s::id, obj_state_s::label, lbl, GVJ_s::obj, strdup_and_subst_obj(), obj_state_s::target, obj_state_s::tooltip, TRUE, and obj_state_s::url.
char** parse_style | ( | char * | s | ) |
void pop_obj_state | ( | GVJ_t * | job | ) |
Definition at line 113 of file emit.c.
References assert, obj_state_s::headtarget, obj_state_s::headtooltip, obj_state_s::headurl, obj_state_s::id, obj_state_s::labeltarget, obj_state_s::labeltooltip, obj_state_s::labelurl, GVJ_s::obj, obj_state_s::parent, obj_state_s::tailtarget, obj_state_s::tailtooltip, obj_state_s::tailurl, obj_state_s::target, obj_state_s::tooltip, obj_state_s::url, obj_state_s::url_bsplinemap_n, obj_state_s::url_bsplinemap_p, and obj_state_s::url_map_p.
obj_state_t* push_obj_state | ( | GVJ_t * | job | ) |
Definition at line 84 of file emit.c.
References agerr(), AGERR, obj_state_s::fill, FILL_NONE, obj_state_s::fillcolor, obj_state_s::gradient_angle, GVJ_s::obj, parent, obj_state_s::parent, obj_state_s::pen, PEN_SOLID, obj_state_s::pencolor, obj_state_s::penwidth, PENWIDTH_NORMAL, obj_state_s::stopcolor, and zmalloc().
Definition at line 625 of file emit.c.
References colorseg_t::color, DEFAULT_COLOR, FILL, gvrender_polygon(), gvrender_set_fillcolor(), gvrender_set_penwidth(), NULL, GVJ_s::obj, obj_state_s::penwidth, colorsegs_t::segs, colorseg_t::t, THIN_LINE, and pointf_s::x.
Referenced by emit_clusters().
Definition at line 794 of file emit.c.
References Bezier(), left, boxf::LL, right, update_bb_bz(), boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by clip_and_install(), and update_bb_bz().
Definition at line 574 of file emit.c.
References colorseg_t::color, DEFAULT_COLOR, ellipticWedge(), freePath(), gvrender_beziercurve(), gvrender_set_fillcolor(), gvrender_set_penwidth(), M_PI, NULL, GVJ_s::obj, obj_state_s::penwidth, colorsegs_t::segs, colorseg_t::t, THIN_LINE, pointf_s::x, and pointf_s::y.
Definition at line 3005 of file emit.c.
References xdot_text::align, exdot_op::bb, xdot_polyline::cnt, xdot::cnt, dtinsert, _xdot_op::ellipse, textfont_t::flags, textspan_t::font, _xdot_op::font, _xdot_op::fontchar, xdot::freefunc, GD_bb, GD_drawing, GD_gvc, xdot_rect::h, textspan_t::just, _xdot_op::kind, boxf::LL, MAXDOUBLE, textfont_t::name, xdot_font::name, NEW, NULL, exdot_op::op, xdot::ops, _xdot_op::polygon, xdot_polyline::pts, textfont_t::size, xdot_font::size, exdot_op::span, textspan_t::str, xdot_text::text, _xdot_op::text, GVC_s::textfont_dt, textspan_size(), _xdot_op::u, boxf::UR, xdot_rect::w, pointf_s::x, xdot_rect::x, xdot_text::x, xd_filled_bezier, xd_filled_ellipse, xd_filled_polygon, xd_font, xd_fontchar, xd_polyline, xd_text, xd_unfilled_bezier, xd_unfilled_ellipse, xd_unfilled_polygon, pointf_s::y, xdot_rect::y, and xdot_text::y.
Referenced by init_nop().
gvdevice_callbacks_t gvdevice_callbacks |
Definition at line 663 of file gvevent.c.
Referenced by gvRenderJobs().
gvevent_key_binding_t gvevent_key_binding[] |
Definition at line 644 of file gvevent.c.
Referenced by gvRenderJobs().
int gvevent_key_binding_size |
Definition at line 661 of file gvevent.c.
Referenced by gvRenderJobs().