static void printptf(FILE * f, pointf pt)
{
- fprintf(f, " %.3g %.3g", PS2INCH(pt.x), PS2INCH(YDIR(pt.y)));
+ fprintf(f, " %.5g %.5g", PS2INCH(pt.x), PS2INCH(YDIR(pt.y)));
}
/* setYInvert:
// setup_graph(job, g);
setYInvert(g);
pt = GD_bb(g).UR;
- fprintf(f, "graph %.3g %.3g %.3g\n", job->zoom, PS2INCH(pt.x), PS2INCH(pt.y));
+ fprintf(f, "graph %.5g %.5g %.5g\n", job->zoom, PS2INCH(pt.x), PS2INCH(pt.y));
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
if (IS_CLUST_NODE(n))
continue;
lbl = agcanonical (agxget(n, N_label->index));
else
lbl = canon(ND_label(n)->text);
- fprintf(f, " %.3g %.3g %s %s %s %s %s\n",
+ fprintf(f, " %.5g %.5g %s %s %s %s %s\n",
ND_width(n), ND_height(n), lbl,
late_nnstring(n, N_style, "solid"),
ND_shape(n)->name,
char buf[BUFSIZ];
if (f->n_flds == 0) {
- sprintf(buf, "%.3g,%.3g,%.3g,%.3g ",
+ sprintf(buf, "%.5g,%.5g,%.5g,%.5g ",
f->b.LL.x + ND_coord(n).x,
YFDIR(f->b.LL.y + ND_coord(n).y),
f->b.UR.x + ND_coord(n).x,
char buf[BUFSIZ];
pointf pt;
- sprintf(buf, "%.3g,%.3g,%.3g,%.3g", GD_bb(g).LL.x, YFDIR(GD_bb(g).LL.y),
+ sprintf(buf, "%.5g,%.5g,%.5g,%.5g", GD_bb(g).LL.x, YFDIR(GD_bb(g).LL.y),
GD_bb(g).UR.x, YFDIR(GD_bb(g).UR.y));
agset(g, "bb", buf);
if (GD_label(g) && GD_label(g)->text[0]) {
pt = GD_label(g)->pos;
- sprintf(buf, "%.3g,%.3g", pt.x, YFDIR(pt.y));
+ sprintf(buf, "%.5g,%.5g", pt.x, YFDIR(pt.y));
agset(g, "lp", buf);
}
for (c = 1; c <= GD_n_cluster(g); c++)
safe_dcl(g, g, "lp", "", agraphattr);
if (GD_label(g)->text[0]) {
ptf = GD_label(g)->pos;
- sprintf(buf, "%.3g,%.3g", ptf.x, YFDIR(ptf.y));
+ sprintf(buf, "%.5g,%.5g", ptf.x, YFDIR(ptf.y));
agset(g, "lp", buf);
}
}
safe_dcl(g, g, "bb", "", agraphattr);
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
if (dim3) {
- sprintf(buf, "%.3g,%.3g,%d", ND_coord(n).x, YDIR(ND_coord(n).y), POINTS(ND_pos(n)[2]));
+ sprintf(buf, "%.5g,%.5g,%d", ND_coord(n).x, YDIR(ND_coord(n).y), POINTS(ND_pos(n)[2]));
} else {
- sprintf(buf, "%.3g,%.3g", ND_coord(n).x, YDIR(ND_coord(n).y));
+ sprintf(buf, "%.5g,%.5g", ND_coord(n).x, YDIR(ND_coord(n).y));
}
agset(n, "pos", buf);
- sprintf(buf, "%.3g", PS2INCH(ND_ht(n)));
+ sprintf(buf, "%.5g", PS2INCH(ND_ht(n)));
agxset(n, N_height->index, buf);
- sprintf(buf, "%.3g", PS2INCH(ND_lw(n) + ND_rw(n)));
+ sprintf(buf, "%.5g", PS2INCH(ND_lw(n) + ND_rw(n)));
agxset(n, N_width->index, buf);
if (strcmp(ND_shape(n)->name, "record") == 0) {
set_record_rects(n, ND_shape_info(n), &xb);
if (i > 0)
agxbputc(&xb, ' ');
if (poly->sides >= 3)
- sprintf(buf, "%.3g %.3g",
+ sprintf(buf, "%.5g %.5g",
PS2INCH(poly->vertices[i].x),
YFDIR(PS2INCH(poly->vertices[i].y)));
else
- sprintf(buf, "%.3g %.3g",
+ sprintf(buf, "%.5g %.5g",
ND_width(n) / 2.0 * cos(i / (double) sides * M_PI * 2.0),
YFDIR(ND_height(n) / 2.0 * sin(i / (double) sides * M_PI * 2.0)));
agxbput(&xb, buf);
agxbputc(&xb, ';');
if (ED_spl(e)->list[i].sflag) {
s_arrows = 1;
- sprintf(buf, "s,%.3g,%.3g ",
+ sprintf(buf, "s,%.5g,%.5g ",
ED_spl(e)->list[i].sp.x,
YFDIR(ED_spl(e)->list[i].sp.y));
agxbput(&xb, buf);
}
if (ED_spl(e)->list[i].eflag) {
e_arrows = 1;
- sprintf(buf, "e,%.3g,%.3g ",
+ sprintf(buf, "e,%.5g,%.5g ",
ED_spl(e)->list[i].ep.x,
YFDIR(ED_spl(e)->list[i].ep.y));
agxbput(&xb, buf);
if (j > 0)
agxbputc(&xb, ' ');
ptf = ED_spl(e)->list[i].list[j];
- sprintf(buf, "%.3g,%.3g", ptf.x, YFDIR(ptf.y));
+ sprintf(buf, "%.5g,%.5g", ptf.x, YFDIR(ptf.y));
agxbput(&xb, buf);
}
}
agset(e, "pos", agxbuse(&xb));
if (ED_label(e)) {
ptf = ED_label(e)->pos;
- sprintf(buf, "%.3g,%.3g", ptf.x, YFDIR(ptf.y));
+ sprintf(buf, "%.5g,%.5g", ptf.x, YFDIR(ptf.y));
agset(e, "lp", buf);
}
if (ED_head_label(e)) {
ptf = ED_head_label(e)->pos;
- sprintf(buf, "%.3g,%.3g", ptf.x, YFDIR(ptf.y));
+ sprintf(buf, "%.5g,%.5g", ptf.x, YFDIR(ptf.y));
agset(e, "head_lp", buf);
}
if (ED_tail_label(e)) {
ptf = ED_tail_label(e)->pos;
- sprintf(buf, "%.3g,%.3g", ptf.x, YDIR(ptf.y));
+ sprintf(buf, "%.5g,%.5g", ptf.x, YDIR(ptf.y));
agset(e, "tail_lp", buf);
}
}
{
fprintf(stderr, "gsave\n");
fprintf(stderr,
- "newpath %.3g %.3g moveto %.3g %.3g 2 0 360 arc closepath fill stroke\n",
+ "newpath %.5g %.5g moveto %.5g %.5g 2 0 360 arc closepath fill stroke\n",
p.x, p.y, p.x, p.y);
fprintf(stderr, "/Times-Roman findfont 4 scalefont setfont\n");
- fprintf(stderr, "%.3g %.3g moveto (\\(%.3g,%.3g\\)) show\n", p.x + 5, p.y + 5,
+ fprintf(stderr, "%.5g %.5g moveto (\\(%.5g,%.5g\\)) show\n", p.x + 5, p.y + 5,
p.x, p.y);
fprintf(stderr, "grestore\n");
}
#endif
fprintf(stderr, "%d boxes:\n", pp->nbox);
for (bi = 0; bi < pp->nbox; bi++)
- fprintf(stderr, "%d (%.3g, %.3g), (%.3g, %.3g)\n", bi,
+ fprintf(stderr, "%d (%.5g, %.5g), (%.5g, %.5g)\n", bi,
pp->boxes[bi].LL.x, pp->boxes[bi].LL.y,
pp->boxes[bi].UR.x, pp->boxes[bi].UR.y);
- fprintf(stderr, "start port: (%.3g, %.3g), tangent angle: %.3g, %s\n",
+ fprintf(stderr, "start port: (%.5g, %.5g), tangent angle: %.5g, %s\n",
pp->start.p.x, pp->start.p.y, pp->start.theta,
pp->start.constrained ? "constrained" : "not constrained");
- fprintf(stderr, "end port: (%.3g, %.3g), tangent angle: %.3g, %s\n",
+ fprintf(stderr, "end port: (%.5g, %.5g), tangent angle: %.5g, %s\n",
pp->end.p.x, pp->end.p.y, pp->end.theta,
pp->end.constrained ? "constrained" : "not constrained");
}