]> git.donarmstrong.com Git - lilypond.git/blob - lily/ps-score.cc
05137ecb9b460767e04e6dea1d553ea9b5175149
[lilypond.git] / lily / ps-score.cc
1 /*
2   ps-score.cc -- implement Ps_score
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "debug.hh"
10 #include "file-results.hh"
11 #include "header.hh"
12 #include "main.hh"
13 #include "paper-def.hh"
14 #include "ps-stream.hh"
15 #include "ps-outputter.hh"
16 #include "ps-score.hh"
17
18 Paper_outputter*
19 Ps_score::paper_outputter_p (Paper_stream* os_p) const
20 {
21   if (header_global_p)
22     *os_p << header_global_p->ps_string ();
23   
24   *os_p << _ ("\n% outputting Score, defined at: ") << origin_str_ << '\n';
25
26   if (header_l_)
27     *os_p << header_l_->ps_string ();
28   *os_p << paper_l_->output_settings_str ();
29
30   if (experimental_features_global_b)
31     *os_p << "turnOnExperimentalFeatures\n";
32
33   return new Ps_outputter (os_p);
34 }
35
36 Paper_stream*
37 Ps_score::paper_stream_p () const
38 {
39   String outname = base_output_str ();
40
41   if (outname != "-")
42     outname += ".ps";
43   *mlog << _f ("PostScript output to %s...", 
44                outname == "-" ? String ("<stdout>") : outname ) << endl;
45   target_str_global_array.push (outname);
46   return new Ps_stream (outname);
47 }
48