]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/clip-region.scm
Regtests for lilypond-book include files located in subdir.
[lilypond.git] / scm / clip-region.scm
index 7e86358b602de97d6828ee04bcdee5428ef1ab82..3585a12bc3805b4c1cfd9e8a1d4cbd96cc2c7658 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2006--2009 Han-Wen Nienhuys <hanwen@lilypond.org>
+;;;; Copyright (C) 2006--2012 Han-Wen Nienhuys <hanwen@lilypond.org>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
 
 (use-modules (lily))
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; The procedures shown in this list have been moved to
+;; scm/output-lib.scm
+;;
+;;
+;;     (define-public (make-rhythmic-location bar-num num den)
+;:     (define-public (rhythmic-location? a)
+;;     (define-public (make-graceless-rhythmic-location loc)
+;;     (define-public rhythmic-location-measure-position cdr)
+;;     (define-public rhythmic-location-bar-number car)
+;;     (define-public (rhythmic-location<? a b)
+;:     (define-public (rhythmic-location<=? a b)
+;:     (define-public (rhythmic-location>=? a b)
+;;     (define-public (rhythmic-location>? a b)
+;:     (define-public (rhythmic-location=? a b)
+;;     (define-public (rhythmic-location->file-string a)
+;;     (define-public (rhythmic-location->string a)
 
-(define-public (make-rhythmic-location bar-num num den)
-  (cons
-   bar-num (ly:make-moment num den)))
-
-(define-public (rhythmic-location? a)
-  (and (pair? a)
-       (integer? (car a))
-       (ly:moment? (cdr a))))
-
-(define-public (make-graceless-rhythmic-location loc)
-  (make-rhythmic-location
-   (car loc)
-   (ly:moment-main-numerator (rhythmic-location-measure-position loc))
-   (ly:moment-main-denominator (rhythmic-location-measure-position loc))))
-                  
-                                            
-(define-public rhythmic-location-measure-position cdr)
-(define-public rhythmic-location-bar-number car)
-
-(define-public (rhythmic-location<? a b)
-  (cond
-   ((< (car a) (car b)) #t)
-   ((> (car a) (car b)) #f)
-   (else
-    (ly:moment<? (cdr a) (cdr b)))))
-
-(define-public (rhythmic-location<=? a b)
-  (not (rhythmic-location<? b a)))
-(define-public (rhythmic-location>=? a b)
-  (rhythmic-location<? a b))
-(define-public (rhythmic-location>? a b)
-  (rhythmic-location<? b a))
-
-(define-public (rhythmic-location=? a b)
-  (and (rhythmic-location<=? a b)
-       (rhythmic-location<=? b a)))
-
-
-(define-public (rhythmic-location->file-string a)
-  (ly:format "~a.~a.~a"
-         (car a)
-         (ly:moment-main-numerator (cdr a))
-         (ly:moment-main-denominator (cdr a))))
-
-(define-public (rhythmic-location->string a)
-  (ly:format "bar ~a ~a"
-         (car a)
-         (ly:moment->string  (cdr a))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  Actual clipping logic.
@@ -80,8 +50,8 @@
 ;; but let's leave that for future extensions.
 ;;
 (define-public (system-clipped-x-extent system-grob clip-region)
-  "Return the X-extent of the SYSTEM-GROB when clipped with
-CLIP-REGION. Return #f if not appropriate."
+  "Return the X-extent of @var{system-grob} when clipped with
+@var{clip-region}.  Return @code{#f} if not appropriate."
   
   (let*
       ((region-start (car clip-region))