[metapost] Questions re ps_out

Shriramana Sharma samjnaa at gmail.com
Wed Aug 8 09:07:05 CEST 2012


According to the MPLib doc if I use mp_ps_ship_out on an edge object
i.e. figure apparently I can get the PostScript code for that figure
stored in the ps_out field in mp_run_data.

1) If I want the PostScript code for all the figures at a time, I have
to manually do a for loop to run this on each edge_object and
individually save the output somewhere else? (I am thinking like a
QList<QString>...) Can't this be made automatic (perhaps by request --
ship_out_all or something)?

2) Re the mp_stream struct that the ps_out is: char*data; char*cur;,
do I understand that char*data will give the actual PS code? What is
cur? The current position in the stream?

3) The syntax of the mp_ps_ship_out function is  int
mp_ps_ship_out(mp_edge_object*hh,int prologues,int procset).

a. Do I understand correctly I have to point hh to the desired edge
object (figure) for which I want PS code and that by prologues I
assume you mean the one for which we set value using prologues:= in
the MP code? (Which is perhaps not accessible per figure being a
global variable...)

b. What is procset and what value should I pass it? I don't find this
word anywhere else in the API doc or the manual.


Shriramana Sharma

More information about the metapost mailing list