lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stencils


From: David Feuer
Subject: Re: Stencils
Date: Thu, 6 Apr 2006 16:26:52 -0400

Sorry I've been thinking aloud on the list.

My proposal can be simplified more: no need for a round robin for the
pages when there's one for the stencils.  Different master outputters
can have different interfaces, so EPS output may get different
interfaces than the PS and TeX ones.  Suppose for a minute that a page
description is a list of stencils.

What Lilypond does, roughly:

(if do-ps
  (ps-master-output ps-outputter get-page))
(if do-tex
  (tex-master-output tex-outputter get-page))
(if do-eps
  (eps-master-output eps-header-out eps-page-out get-page))

What framework-ps might do (outputter should probably come in through
a module interface, but I don't know Guile modules).  This is somewhat
simplified.

(define (master-output outputter get-page)
  (make-header outputter)
  (let do-page ()
     (output-page (get-page) outputter)
     (do-page))
  (make-footer outputter))

(define (output-page page outputter)
  (outputter [page-header])
  (output-stencils page outputter))

(define (output-stencils s-list outputter)
  (if (null? s-list)
    (outputter [footer])
    (begin
      (outputter (force (car s-list)))
      (output-stencils (cdr s-list)))))


David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]