Graphviz 13.0.0~dev.20241220.2304
|
#include "config.h"
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <common/macros.h>
#include <common/const.h>
#include <gvc/gvplugin_render.h>
#include <common/utils.h>
#include <gvc/gvplugin_device.h>
#include <gvc/gvio.h>
#include <gvc/gvcint.h>
#include <util/agxbuf.h>
#include <util/strcasecmp.h>
#include <util/unreachable.h>
Go to the source code of this file.
Macros | |
#define | LOCALNAMEPREFIX '%' |
#define | EDGEALIGN 0 |
Enumerations | |
enum | format_type { FORMAT_SVG , FORMAT_SVGZ , FORMAT_SVG_INLINE } |
Functions | |
static bool | emit_standalone_headers (const GVJ_t *job) |
static void | svg_bzptarray (GVJ_t *job, pointf *A, size_t n) |
static void | svg_print_id_class (GVJ_t *job, char *id, char *idx, char *kind, void *obj) |
static void | svg_print_paint (GVJ_t *job, gvcolor_t color) |
static void | svg_print_gradient_color (GVJ_t *job, gvcolor_t color) |
static void | svg_grstyle (GVJ_t *job, int filled, int gid) |
static void | svg_comment (GVJ_t *job, char *str) |
static void | svg_begin_job (GVJ_t *job) |
static void | svg_begin_graph (GVJ_t *job) |
static void | svg_end_graph (GVJ_t *job) |
static void | svg_begin_layer (GVJ_t *job, char *layername, int layerNum, int numLayers) |
static void | svg_end_layer (GVJ_t *job) |
static void | svg_begin_page (GVJ_t *job) |
static void | svg_end_page (GVJ_t *job) |
static void | svg_begin_cluster (GVJ_t *job) |
static void | svg_end_cluster (GVJ_t *job) |
static void | svg_begin_node (GVJ_t *job) |
static void | svg_end_node (GVJ_t *job) |
static void | svg_begin_edge (GVJ_t *job) |
static void | svg_end_edge (GVJ_t *job) |
static void | svg_begin_anchor (GVJ_t *job, char *href, char *tooltip, char *target, char *id) |
static void | svg_end_anchor (GVJ_t *job) |
static void | svg_textspan (GVJ_t *job, pointf p, textspan_t *span) |
static void | svg_print_stop (GVJ_t *job, double offset, gvcolor_t color) |
static int | svg_gradstyle (GVJ_t *job, pointf *A, size_t n) |
static int | svg_rgradstyle (GVJ_t *job) |
static void | svg_ellipse (GVJ_t *job, pointf *A, int filled) |
static void | svg_bezier (GVJ_t *job, pointf *A, size_t n, int filled) |
static void | svg_polygon (GVJ_t *job, pointf *A, size_t n, int filled) |
static void | svg_polyline (GVJ_t *job, pointf *A, size_t n) |
Variables | |
static const char | sdasharray [] = "5,2" |
static const char | sdotarray [] = "1,5" |
static const char | transparent [] = "transparent" |
static const char | none [] = "none" |
static const char | black [] = "black" |
static char * | svg_knowncolors [] |
gvrender_engine_t | svg_engine |
gvrender_features_t | render_features_svg |
gvdevice_features_t | device_features_svg |
gvdevice_features_t | device_features_svgz |
gvplugin_installed_t | gvrender_svg_types [] |
gvplugin_installed_t | gvdevice_svg_types [] |
#define EDGEALIGN 0 |
Definition at line 45 of file gvrender_core_svg.c.
#define LOCALNAMEPREFIX '%' |
Definition at line 42 of file gvrender_core_svg.c.
enum format_type |
Enumerator | |
---|---|
FORMAT_SVG | |
FORMAT_SVGZ | |
FORMAT_SVG_INLINE |
Definition at line 48 of file gvrender_core_svg.c.
|
static |
Definition at line 59 of file gvrender_core_svg.c.
References FORMAT_SVG_INLINE, gvplugin_active_render_s::id, and GVJ_s::render.
Referenced by svg_begin_graph(), and svg_begin_job().
|
static |
Definition at line 389 of file gvrender_core_svg.c.
References flags, gvputc(), gvputs(), gvputs_xml(), xml_flags_t::raw, and xml_escape().
|
static |
Definition at line 331 of file gvrender_core_svg.c.
References agnameof(), obj_state_s::g, gvputs(), gvputs_xml(), obj_state_s::id, NULL, GVJ_s::obj, obj_state_s::sg, svg_print_id_class(), and obj_state_s::u.
|
static |
Definition at line 368 of file gvrender_core_svg.c.
References obj_state_s::e, free(), gvputs(), gvputs_xml(), obj_state_s::id, NULL, GVJ_s::obj, strdup_and_subst_obj(), svg_print_id_class(), and obj_state_s::u.
|
static |
Definition at line 244 of file gvrender_core_svg.c.
References agnameof(), GVJ_s::canvasBox, emit_standalone_headers(), obj_state_s::g, gvprintf(), gvputs(), gvputs_xml(), GVJ_s::height, boxf::LL, LOCALNAMEPREFIX, GVJ_s::obj, GVJ_s::pagesArraySize, obj_state_s::u, boxf::UR, GVJ_s::width, point::x, pointf_s::x, point::y, and pointf_s::y.
|
static |
Definition at line 220 of file gvrender_core_svg.c.
References agget(), GVJ_s::common, emit_standalone_headers(), GVC_s::g, GVJ_s::gvc, gvputs(), gvputs_xml(), and GVCOMMON_s::info.
|
static |
Definition at line 282 of file gvrender_core_svg.c.
References obj_state_s::g, gvputs(), NULL, GVJ_s::obj, svg_print_id_class(), and obj_state_s::u.
|
static |
Definition at line 347 of file gvrender_core_svg.c.
References agnameof(), GVJ_s::gvc, gvputs(), gvputs_xml(), obj_state_s::id, GVC_s::layerIDs, GVJ_s::layerNum, obj_state_s::n, NULL, GVJ_s::obj, svg_print_id_class(), and obj_state_s::u.
|
static |
Definition at line 303 of file gvrender_core_svg.c.
References agnameof(), obj_state_s::g, gvprintdouble(), gvprintf(), gvputc(), gvputs(), gvputs_xml(), obj_state_s::id, LOCALNAMEPREFIX, NULL, GVJ_s::obj, GVJ_s::rotation, GVJ_s::scale, svg_print_id_class(), GVJ_s::translation, obj_state_s::u, pointf_s::x, and pointf_s::y.
Definition at line 658 of file gvrender_core_svg.c.
References A, GRADIENT, gvputs(), gvputs_xml(), obj_state_s::id, obj_state_s::labeledgealigned, GVJ_s::obj, RGRADIENT, svg_bzptarray(), svg_gradstyle(), svg_grstyle(), and svg_rgradstyle().
Definition at line 63 of file gvrender_core_svg.c.
References A, gvprintdouble(), gvputc(), gvwrite(), and SIZE_MAX.
Referenced by svg_bezier().
|
static |
Definition at line 213 of file gvrender_core_svg.c.
References gvputs(), gvputs_xml(), and str.
Definition at line 635 of file gvrender_core_svg.c.
References A, GRADIENT, gvprintdouble(), gvputs(), RGRADIENT, svg_gradstyle(), svg_grstyle(), and svg_rgradstyle().
|
static |
Definition at line 421 of file gvrender_core_svg.c.
References gvputs().
|
static |
Definition at line 342 of file gvrender_core_svg.c.
References gvputs().
|
static |
Definition at line 383 of file gvrender_core_svg.c.
References gvputs().
|
static |
Definition at line 277 of file gvrender_core_svg.c.
References gvputs().
|
static |
Definition at line 294 of file gvrender_core_svg.c.
References gvputs().
|
static |
Definition at line 363 of file gvrender_core_svg.c.
References gvputs().
|
static |
Definition at line 326 of file gvrender_core_svg.c.
References gvputs().
Definition at line 568 of file gvrender_core_svg.c.
References A, obj_state_s::fillcolor, G, get_gradient_points(), obj_state_s::gradient_angle, obj_state_s::gradient_frac, gvprintdouble(), gvprintf(), gvputc(), gvputs(), gvputs_xml(), id, obj_state_s::id, M_PI, NULL, GVJ_s::obj, obj_state_s::stopcolor, and svg_print_stop().
Referenced by svg_bezier(), svg_ellipse(), and svg_polygon().
|
static |
Definition at line 163 of file gvrender_core_svg.c.
References obj_state_s::fillcolor, GRADIENT, gvprintdouble(), gvprintf(), gvputc(), gvputs(), gvputs_xml(), obj_state_s::id, NULL, GVJ_s::obj, obj_state_s::pen, PEN_DASHED, PEN_DOTTED, obj_state_s::pencolor, obj_state_s::penwidth, PENWIDTH_NORMAL, color_s::rgba, RGBA_BYTE, RGRADIENT, sdasharray, sdotarray, svg_print_paint(), color_s::type, and color_s::u.
Referenced by svg_bezier(), svg_ellipse(), svg_polygon(), and svg_polyline().
Definition at line 679 of file gvrender_core_svg.c.
References A, GRADIENT, gvprintdouble(), gvputc(), gvputs(), RGRADIENT, svg_gradstyle(), svg_grstyle(), and svg_rgradstyle().
Definition at line 702 of file gvrender_core_svg.c.
References A, gvprintdouble(), gvputc(), gvputs(), and svg_grstyle().
Definition at line 145 of file gvrender_core_svg.c.
References black, color(), COLOR_STRING, gvprintf(), gvputs(), RGBA_BYTE, transparent, and UNREACHABLE.
Referenced by svg_print_stop().
|
static |
Definition at line 96 of file gvrender_core_svg.c.
References agget(), gvprintf(), gvputc(), gvputs(), gvputs_xml(), and str.
Referenced by svg_begin_cluster(), svg_begin_edge(), svg_begin_layer(), svg_begin_node(), and svg_begin_page().
Definition at line 117 of file gvrender_core_svg.c.
References color(), COLOR_STRING, gvprintf(), gvputs(), none, RGBA_BYTE, transparent, and UNREACHABLE.
Referenced by svg_grstyle().
Definition at line 546 of file gvrender_core_svg.c.
References color(), COLOR_STRING, gvprintf(), gvputs(), offset, RGBA_BYTE, svg_print_gradient_color(), and transparent.
Referenced by svg_gradstyle(), and svg_rgradstyle().
|
static |
Definition at line 604 of file gvrender_core_svg.c.
References obj_state_s::fillcolor, obj_state_s::gradient_angle, gvprintf(), gvputc(), gvputs(), gvputs_xml(), id, obj_state_s::id, M_PI, NULL, GVJ_s::obj, obj_state_s::stopcolor, and svg_print_stop().
Referenced by svg_bezier(), svg_ellipse(), and svg_polygon().
|
static |
Definition at line 427 of file gvrender_core_svg.c.
References COLOR_STRING, _PostscriptAlias::family, flags, textfont_t::flags, textspan_t::font, GVC_s::g, GD_fontnames, GVJ_s::gvc, gvprintdouble(), gvprintf(), gvputc(), gvputs(), gvputs_xml(), HTML_BF, HTML_IF, HTML_OL, HTML_S, HTML_SUB, HTML_SUP, HTML_UL, obj_state_s::id, textspan_t::just, obj_state_s::labeledgealigned, _PostscriptAlias::name, textfont_t::name, NATIVEFONTS, NULL, GVJ_s::obj, obj_state_s::pencolor, textfont_t::postscript_alias, PSFONTS, xml_flags_t::raw, color_s::rgba, RGBA_BYTE, textfont_t::size, textspan_t::str, _PostscriptAlias::stretch, color_s::string, _PostscriptAlias::style, _PostscriptAlias::svg_font_family, _PostscriptAlias::svg_font_style, _PostscriptAlias::svg_font_weight, SVGFONTS, color_s::type, color_s::u, UNREACHABLE, _PostscriptAlias::weight, pointf_s::x, xml_escape(), pointf_s::y, and textspan_t::yoffset_centerline.
|
static |
Definition at line 57 of file gvrender_core_svg.c.
Referenced by gdgen_end_page(), node_distinct_coloring_internal2(), and svg_print_gradient_color().
gvdevice_features_t device_features_svg |
Definition at line 803 of file gvrender_core_svg.c.
gvdevice_features_t device_features_svgz |
Definition at line 810 of file gvrender_core_svg.c.
gvplugin_installed_t gvdevice_svg_types[] |
Definition at line 823 of file gvrender_core_svg.c.
gvplugin_installed_t gvrender_svg_types[] |
Definition at line 817 of file gvrender_core_svg.c.
|
static |
Definition at line 56 of file gvrender_core_svg.c.
Referenced by svg_print_paint(), and SWIG_Py_Void().
gvrender_features_t render_features_svg |
Definition at line 795 of file gvrender_core_svg.c.
|
static |
Definition at line 51 of file gvrender_core_svg.c.
Referenced by svg_grstyle().
|
static |
Definition at line 53 of file gvrender_core_svg.c.
Referenced by svg_grstyle().
gvrender_engine_t svg_engine |
Definition at line 762 of file gvrender_core_svg.c.
|
static |
Definition at line 719 of file gvrender_core_svg.c.
|
static |
Definition at line 55 of file gvrender_core_svg.c.
Referenced by svg_print_gradient_color(), svg_print_paint(), and svg_print_stop().