diff --git a/ChangeLog b/ChangeLog index 2028190fc..52d5e22ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * subckt.c: .global bug by R. Larice various files: patches by Robert (Neval, Nintegrate) from Jan 3 2010 and 10 patches from Jan 16, 2010 + * com_hardcopy.c: switching graphics context correctly for postscript output 2010-01-16 Dietmar Warning * tests/transmission: Only few tests should be easier, more examples under diff --git a/src/frontend/com_hardcopy.c b/src/frontend/com_hardcopy.c index f0bfb596c..37d87ac88 100644 --- a/src/frontend/com_hardcopy.c +++ b/src/frontend/com_hardcopy.c @@ -108,10 +108,17 @@ com_hardcopy(wordlist *wl) DevSwitch(NULL); return; } + /* save current graphics context */ + PushGraphContext(currentgraph); + currentgraph = tempgraph; + /* some operations in gr_resize, gr_redraw, and DevSwitch + will be done on currentgraph, not only on tempgraph */ gr_resize(tempgraph); gr_redraw(tempgraph); + DevSwitch(NULL); + /* retrieve current graphics context */ + PopGraphContext(); DestroyGraph(tempgraph->graphid); - DevSwitch(NULL); foundit = 1; } }