From: ellson Date: Tue, 8 Aug 2006 16:39:55 +0000 (+0000) Subject: coerce tcldot into producing ps properly. X-Git-Tag: LAST_LIBGRAPH~32^2~5996 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b3d1b10f29db1702cd62a70c20f1eb59d39c954;p=graphviz coerce tcldot into producing ps properly. --- diff --git a/tclpkg/tcldot/tcldot.c b/tclpkg/tcldot/tcldot.c index b6a3ea936..471f761ac 100644 --- a/tclpkg/tcldot/tcldot.c +++ b/tclpkg/tcldot/tcldot.c @@ -1090,7 +1090,7 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, (char *) 0); return TCL_ERROR; } - job = gvc->active_jobs = gvc->job; + job = gvc->job; job->surface = (void *)(&tkgendata); job->external_surface = TRUE; @@ -1101,8 +1101,11 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, tcldot_layout (gvc, g, (argc > 3) ? argv[3] : (char *) NULL); /* render graph TK canvas commands */ + gvc->common.viewNum = 0; gvRenderJobs(gvc, g); - + gvrender_end_job(job); + gvdevice_finalize(job); + fflush(job->output_file); gvjobs_delete(gvc); return TCL_OK; @@ -1122,7 +1125,7 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, (char *) 0); return TCL_ERROR; } - job = gvc->active_jobs = gvc->job; + job = gvc->job; if (! (hdl = tclhandleXlate(GDHandleTable, argv[2]))) { Tcl_AppendResult(interp, "GD Image not found.", (char *) NULL); @@ -1136,8 +1139,11 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, if (!GD_drawing(g) || argc > 4) tcldot_layout(gvc, g, (argc > 4) ? argv[4] : (char *) NULL); + gvc->common.viewNum = 0; gvRenderJobs(gvc, g); - + gvrender_end_job(job); + gvdevice_finalize(job); + fflush(job->output_file); gvjobs_delete(gvc); Tcl_AppendResult(interp, argv[2], (char *) NULL); return TCL_OK; @@ -1261,7 +1267,7 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, "\". Use one of:", s, (char *)NULL); return TCL_ERROR; } - job = gvc->active_jobs = gvc->job; + job = gvc->job; /* populate new job struct with output language and output file data */ job->output_lang = gvrender_select(job, job->output_langname); @@ -1276,8 +1282,11 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, tcldot_layout(gvc, g, (argc > 4) ? argv[4] : (char *) NULL); } + gvc->common.viewNum = 0; gvRenderJobs(gvc, g); - + gvrender_end_job(job); + gvdevice_finalize(job); + fflush(job->output_file); gvjobs_delete(gvc); return TCL_OK;