45 gvputs(job,
"%!PS-Adobe-3.0");
47 gvputs(job,
" EPSF-3.0\n");
50 gvprintf(job,
"%%%%Creator: %s version %s (%s)\n",
56 gvputs(job,
"%%Trailer\n");
61 gvprintf(job,
"%%%%BoundingBox: %d %d %d %d\n",
64 gvputs(job,
"end\nrestore\n");
77 gvputs(job,
"%%Pages: (atend)\n");
79 gvputs(job,
"%%Pages: 1\n");
82 gvputs(job,
"%%BoundingBox: (atend)\n");
84 gvprintf(job,
"%%%%BoundingBox: %d %d %d %d\n",
88 gvputs(job,
"%%EndComments\nsave\n");
108 gvputs(job,
"setupLatin1\n");
113 gvprintf(job,
"[ {Catalog} << /URI << /Base %s >> >>\n"
120 gvprintf(job,
"%d %d setlayer\n", layerNum, numLayers);
130 gvprintf(job,
"%%%%PageBoundingBox: %d %d %d %d\n",
132 gvprintf(job,
"%%%%PageOrientation: %s\n",
133 (job->
rotation ?
"Landscape" :
"Portrait"));
135 gvprintf(job,
"<< /PageSize [%d %d] >> setpagedevice\n",
137 gvprintf(job,
"%d %d %d beginpage\n",
140 gvprintf(job,
"gsave\n%d %d %d %d boxprim clip newpath\n",
142 gvprintf(job,
"%g %g set_scale %d rotate %g %g translate\n",
150 job->
common->
errorfn(
"canvas size (%d,%d) exceeds PDF limit (%d)\n"
151 "\t(suggest setting a bounding box size, see dot(1))\n",
153 gvprintf(job,
"[ /CropBox [%d %d %d %d] /PAGES pdfmark\n",
161 gvputs(job,
"0 0 0 edgecolor\n");
167 gvputs(job,
"endpage\nshowpage\ngrestore\n");
168 gvputs(job,
"%%PageTrailer\n");
183 gvputs(job,
"grestore\n");
193 gvputs(job,
"grestore\n");
204 gvputs(job,
"grestore\n");
216 gvputs(job,
"[ /Rect [ ");
219 gvprintf(job,
" /Border [ 0 0 0 ]\n"
220 " /Action << /Subtype /URI /URI %s >>\n"
234 gvputs(job,
" setlinewidth\n");
236 while (
s && (p = line = *
s++)) {
237 if (strcmp(line,
"setlinewidth") == 0)
248 if (strcmp(line,
"invis") == 0)
274 gvprintf(job,
"%.5g %.5g %.5g %scolor\n",
294 if (strlen(fontname) > 29) {
296 "font name %s is longer than 29 characters which may be rejected by "
301 for (
const char *p = fontname; *p !=
'\0'; ++p) {
302 if (!isascii((
int)*p) || *p ==
' ' ||
gv_iscntrl(*p)) {
304 "font name %s contains characters that may not be accepted by some "
324 switch (span->
just) {
333 p.
x -= span->
size.
x / 2.0;
349 AA[1].
x =
A[1].x -
A[0].x;
350 AA[1].
y =
A[1].y -
A[0].y;
355 gvputs(job,
" ellipse_path fill\n");
361 gvputs(job,
" ellipse_path stroke\n");
371 for (
size_t j = 1; j < n; j += 3) {
373 gvputs(job,
" curveto\n");
375 gvputs(job,
"closepath fill\n");
383 for (
size_t j = 1; j < n; j += 3) {
385 gvputs(job,
" curveto\n");
397 for (
size_t j = 1; j < n; j++) {
401 gvputs(job,
"closepath fill\n");
409 for (
size_t j = 1; j < n; j++) {
413 gvputs(job,
"closepath stroke\n");
424 for (
size_t j = 1; j < n; j++) {
abstract graph C library, Cgraph API
void agwarningf(const char *fmt,...)
char * agnameof(void *)
returns a string descriptor for the object.
replacements for ctype.h functions
static bool gv_iscntrl(int c)
#define GVRENDER_NO_WHITE_BG
#define GVDEVICE_DOES_PAGES
#define GVDEVICE_DOES_LAYERS
#define GVRENDER_DOES_MAPS
#define GVRENDER_DOES_TRANSFORM
#define GVRENDER_DOES_MAP_RECTANGLE
static void color(Agraph_t *g)
int gvputs(GVJ_t *job, const char *s)
void gvprintpointflist(GVJ_t *job, pointf *p, size_t n)
void gvprintpointf(GVJ_t *job, pointf p)
void gvprintf(GVJ_t *job, const char *format,...)
void gvprintdouble(GVJ_t *job, double num)
static void psgen_library_shape(GVJ_t *job, char *name, pointf *A, size_t n, int filled)
static void psgen_textspan(GVJ_t *job, pointf p, textspan_t *span)
gvplugin_installed_t gvrender_ps_types[]
static void check_fontname(const char *fontname)
static gvdevice_features_t device_features_eps
static void psgen_end_job(GVJ_t *job)
static void psgen_begin_anchor(GVJ_t *job, char *url, char *tooltip, char *target, char *id)
static void psgen_begin_page(GVJ_t *job)
static void psgen_begin_edge(GVJ_t *job)
static gvrender_engine_t psgen_engine
static void ps_set_color(GVJ_t *job, gvcolor_t *color)
gvplugin_installed_t gvdevice_ps_types[]
static gvrender_features_t render_features_ps
static void psgen_begin_graph(GVJ_t *job)
static void psgen_end_edge(GVJ_t *job)
static void psgen_end_node(GVJ_t *job)
static void psgen_begin_cluster(GVJ_t *job)
static gvdevice_features_t device_features_ps
static void psgen_begin_node(GVJ_t *job)
static void psgen_end_cluster(GVJ_t *job)
static void psgen_ellipse(GVJ_t *job, pointf *A, int filled)
static void psgen_comment(GVJ_t *job, char *str)
static void psgen_polyline(GVJ_t *job, pointf *A, size_t n)
static void psgen_begin_layer(GVJ_t *job, char *layername, int layerNum, int numLayers)
static void psgen_bezier(GVJ_t *job, pointf *A, size_t n, int filled)
static void psgen_begin_job(GVJ_t *job)
static void psgen_polygon(GVJ_t *job, pointf *A, size_t n, int filled)
static void ps_set_pen_style(GVJ_t *job)
static void psgen_end_page(GVJ_t *job)
textitem scanner parser str
#define PRISIZE_T
PRIu64 alike for printing size_t
static const char * ps_txt[]
void epsf_define(GVJ_t *job)
char * ps_string(char *ins, int chset)
void cat_libfile(GVJ_t *job, const char **arglib, const char **stdlib)
void(* errorfn)(const char *fmt,...)
const char ** show_boxes
emit code for correct box coordinates
int viewNum
rendering state
gvplugin_active_render_t render
double yoffset_centerline