Graphviz 13.0.0~dev.20250204.0809
|
#include "config.h"
#include <assert.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <gvc/gvplugin_render.h>
#include <gvc/gvplugin_device.h>
#include <gvc/gvio.h>
#include <cgraph/cgraph.h>
#include <common/utils.h>
#include <util/agxbuf.h>
#include <util/gv_ctype.h>
#include <util/prisize_t.h>
#include "ps.h"
#include <common/const.h>
Go to the source code of this file.
Macros | |
#define | PDFMAX 14400 /* Maximum size of PDF page */ |
Enumerations | |
enum | format_type { FORMAT_PS , FORMAT_PS2 , FORMAT_EPS } |
Functions | |
static void | psgen_begin_job (GVJ_t *job) |
static void | psgen_end_job (GVJ_t *job) |
static void | psgen_begin_graph (GVJ_t *job) |
static void | psgen_begin_layer (GVJ_t *job, char *layername, int layerNum, int numLayers) |
static void | psgen_begin_page (GVJ_t *job) |
static void | psgen_end_page (GVJ_t *job) |
static void | psgen_begin_cluster (GVJ_t *job) |
static void | psgen_end_cluster (GVJ_t *job) |
static void | psgen_begin_node (GVJ_t *job) |
static void | psgen_end_node (GVJ_t *job) |
static void | psgen_begin_edge (GVJ_t *job) |
static void | psgen_end_edge (GVJ_t *job) |
static void | psgen_begin_anchor (GVJ_t *job, char *url, char *tooltip, char *target, char *id) |
static void | ps_set_pen_style (GVJ_t *job) |
static void | ps_set_color (GVJ_t *job, gvcolor_t *color) |
static void | check_fontname (const char *fontname) |
static void | psgen_textspan (GVJ_t *job, pointf p, textspan_t *span) |
static void | psgen_ellipse (GVJ_t *job, pointf *A, int filled) |
static void | psgen_bezier (GVJ_t *job, pointf *A, size_t n, int filled) |
static void | psgen_polygon (GVJ_t *job, pointf *A, size_t n, int filled) |
static void | psgen_polyline (GVJ_t *job, pointf *A, size_t n) |
static void | psgen_comment (GVJ_t *job, char *str) |
static void | psgen_library_shape (GVJ_t *job, char *name, pointf *A, size_t n, int filled) |
Variables | |
static int | isLatin1 |
static bool | setupLatin1 |
static gvrender_engine_t | psgen_engine |
static gvrender_features_t | render_features_ps |
static gvdevice_features_t | device_features_ps |
static gvdevice_features_t | device_features_eps |
gvplugin_installed_t | gvrender_ps_types [] |
gvplugin_installed_t | gvdevice_ps_types [] |
#define PDFMAX 14400 /* Maximum size of PDF page */ |
Definition at line 36 of file gvrender_core_ps.c.
enum format_type |
Enumerator | |
---|---|
FORMAT_PS | |
FORMAT_PS2 | |
FORMAT_EPS |
Definition at line 38 of file gvrender_core_ps.c.
|
static |
check a font name abides by Adobe’s rules
Adobe Technical Note #5088 “Font Naming Issues” §2.2:
For compatibility with the earliest versions of PostScript interpreters and with the file systems in some operating systems, Adobe limits the number of characters in the FontName
to 29 characters.
As with any PostScript language name, a valid FontName
must not contain spaces, and may only use characters from the standard ASCII character set.
fontname | Font name to check |
Definition at line 292 of file gvrender_core_ps.c.
References agwarningf(), and gv_iscntrl().
Referenced by psgen_textspan().
Definition at line 254 of file gvrender_core_ps.c.
References CLUSTER_OBJTYPE, color(), EDGE_OBJTYPE, gvprintf(), NODE_OBJTYPE, GVJ_s::obj, ROOTGRAPH_OBJTYPE, and obj_state_s::type.
Referenced by psgen_bezier(), psgen_ellipse(), psgen_library_shape(), psgen_polygon(), psgen_polyline(), and psgen_textspan().
|
static |
Definition at line 228 of file gvrender_core_ps.c.
References gvprintdouble(), gvprintf(), gvputs(), GVJ_s::obj, obj_state_s::penwidth, penwidth, and obj_state_s::rawstyle.
Referenced by psgen_bezier(), psgen_ellipse(), psgen_library_shape(), psgen_polygon(), and psgen_polyline().
|
static |
Definition at line 207 of file gvrender_core_ps.c.
References gvprintf(), gvprintpointflist(), gvputs(), isLatin1, GVJ_s::obj, ps_string(), and obj_state_s::url_map_p.
|
static |
Definition at line 172 of file gvrender_core_ps.c.
References agnameof(), obj_state_s::g, gvprintf(), gvputs(), GVJ_s::obj, and obj_state_s::u.
|
static |
Definition at line 197 of file gvrender_core_ps.c.
References gvputs().
|
static |
Definition at line 68 of file gvrender_core_ps.c.
References agnameof(), cat_libfile(), CHAR_LATIN1, GVJ_s::common, epsf_define(), FORMAT_EPS, obj_state_s::g, GD_charset, gvprintf(), gvputs(), gvplugin_active_render_s::id, isLatin1, GVCOMMON_s::lib, box::LL, NULL, GVJ_s::obj, GVJ_s::pageBoundingBox, ps_string(), ps_txt, GVJ_s::render, setupLatin1, GVCOMMON_s::show_boxes, obj_state_s::u, box::UR, obj_state_s::url, GVCOMMON_s::viewNum, point::x, and point::y.
|
static |
Definition at line 43 of file gvrender_core_ps.c.
References GVJ_s::common, FORMAT_EPS, gvprintf(), gvputs(), gvplugin_active_render_s::id, GVCOMMON_s::info, and GVJ_s::render.
|
static |
Definition at line 117 of file gvrender_core_ps.c.
References gvprintf().
|
static |
Definition at line 186 of file gvrender_core_ps.c.
References gvputs().
|
static |
Definition at line 123 of file gvrender_core_ps.c.
References GVJ_s::common, GVCOMMON_s::errorfn, FORMAT_PS2, gvprintf(), gvplugin_active_render_s::id, box::LL, NULL, GVJ_s::numPages, GVJ_s::pageBoundingBox, GVJ_s::pagesArrayElem, PDFMAX, GVJ_s::render, GVJ_s::rotation, GVJ_s::scale, GVCOMMON_s::show_boxes, GVJ_s::translation, box::UR, GVCOMMON_s::viewNum, point::x, pointf_s::x, point::y, and pointf_s::y.
Definition at line 365 of file gvrender_core_ps.c.
References A, obj_state_s::fillcolor, gvprintpointf(), gvprintpointflist(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), and color_s::u.
|
static |
Definition at line 343 of file gvrender_core_ps.c.
References A, obj_state_s::fillcolor, gvprintpointflist(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), color_s::u, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 181 of file gvrender_core_ps.c.
References gvputs().
|
static |
Definition at line 202 of file gvrender_core_ps.c.
References gvputs().
|
static |
Definition at line 54 of file gvrender_core_ps.c.
References GVJ_s::boundingBox, GVJ_s::common, FORMAT_EPS, gvprintf(), gvputs(), gvplugin_active_render_s::id, box::LL, NULL, GVJ_s::render, GVCOMMON_s::show_boxes, box::UR, GVCOMMON_s::viewNum, point::x, and point::y.
|
static |
Definition at line 191 of file gvrender_core_ps.c.
References gvputs().
|
static |
Definition at line 158 of file gvrender_core_ps.c.
References cat_libfile(), GVJ_s::common, gvprintf(), gvputs(), NULL, GVCOMMON_s::show_boxes, and GVCOMMON_s::viewNum.
|
static |
Definition at line 439 of file gvrender_core_ps.c.
References A, obj_state_s::fillcolor, gvprintf(), gvprintpointf(), gvprintpointflist(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, PRISIZE_T, ps_set_color(), ps_set_pen_style(), and color_s::u.
Definition at line 391 of file gvrender_core_ps.c.
References A, obj_state_s::fillcolor, gvprintpointf(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), and color_s::u.
Definition at line 417 of file gvrender_core_ps.c.
References A, gvprintpointf(), gvputs(), color_s::HSVA, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_set_pen_style(), and color_s::u.
|
static |
Definition at line 312 of file gvrender_core_ps.c.
References check_fontname(), textspan_t::font, gvprintdouble(), gvprintf(), gvprintpointf(), gvputs(), color_s::HSVA, isLatin1, textspan_t::just, textfont_t::name, GVJ_s::obj, obj_state_s::pencolor, ps_set_color(), ps_string(), textfont_t::size, textspan_t::size, str, textspan_t::str, color_s::u, pointf_s::x, pointf_s::y, and textspan_t::yoffset_centerline.
|
static |
Definition at line 512 of file gvrender_core_ps.c.
|
static |
Definition at line 504 of file gvrender_core_ps.c.
gvplugin_installed_t gvdevice_ps_types[] |
Definition at line 524 of file gvrender_core_ps.c.
gvplugin_installed_t gvrender_ps_types[] |
Definition at line 519 of file gvrender_core_ps.c.
|
static |
Definition at line 40 of file gvrender_core_ps.c.
Referenced by psgen_begin_anchor(), psgen_begin_graph(), and psgen_textspan().
|
static |
Definition at line 460 of file gvrender_core_ps.c.
|
static |
Definition at line 493 of file gvrender_core_ps.c.
|
static |
Definition at line 41 of file gvrender_core_ps.c.
Referenced by psgen_begin_graph().