OLD | NEW |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> | 3 ;;;; Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> |
4 ;;;; | 4 ;;;; |
5 ;;;; LilyPond is free software: you can redistribute it and/or modify | 5 ;;;; LilyPond is free software: you can redistribute it and/or modify |
6 ;;;; it under the terms of the GNU General Public License as published by | 6 ;;;; it under the terms of the GNU General Public License as published by |
7 ;;;; the Free Software Foundation, either version 3 of the License, or | 7 ;;;; the Free Software Foundation, either version 3 of the License, or |
8 ;;;; (at your option) any later version. | 8 ;;;; (at your option) any later version. |
9 ;;;; | 9 ;;;; |
10 ;;;; LilyPond is distributed in the hope that it will be useful, | 10 ;;;; LilyPond is distributed in the hope that it will be useful, |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 (reverse to-dump-systems))) | 859 (reverse to-dump-systems))) |
860 (format #f "~a.preview" basename) | 860 (format #f "~a.preview" basename) |
861 #t) | 861 #t) |
862 (postprocess-output book framework-ps-module | 862 (postprocess-output book framework-ps-module |
863 (cons "png" (ly:output-formats)) | 863 (cons "png" (ly:output-formats)) |
864 (format #f "~a.preview" basename) | 864 (format #f "~a.preview" basename) |
865 (format #f "~a.preview.eps" basename) | 865 (format #f "~a.preview.eps" basename) |
866 #t | 866 #t |
867 ))) | 867 ))) |
868 | 868 |
| 869 (define-public (output-crop-framework basename book scopes fields) |
| 870 (let* ((paper (ly:paper-book-paper book)) |
| 871 (systems (relevant-book-systems book))) |
| 872 (dump-stencil-as-EPS paper |
| 873 (stack-stencils Y DOWN 0.0 |
| 874 (map paper-system-stencil |
| 875 (reverse (reverse systems)))) |
| 876 (format #f "~a.cropped" basename) |
| 877 #t) |
| 878 (postprocess-output book framework-ps-module |
| 879 (cons "png" (ly:output-formats)) |
| 880 (format #f "~a.cropped" basename) |
| 881 (format #f "~a.cropped.eps" basename) |
| 882 #t |
| 883 ))) |
| 884 |
869 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 885 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
870 | 886 |
871 (define (output-width-height defs) | 887 (define (output-width-height defs) |
872 (let* ((landscape (ly:output-def-lookup defs 'landscape)) | 888 (let* ((landscape (ly:output-def-lookup defs 'landscape)) |
873 (output-scale (ly:output-def-lookup defs 'output-scale)) | 889 (output-scale (ly:output-def-lookup defs 'output-scale)) |
874 (convert (lambda (x) | 890 (convert (lambda (x) |
875 (* x output-scale (/ (ly:bp 1))))) | 891 (* x output-scale (/ (ly:bp 1))))) |
876 (paper-width (convert (ly:output-def-lookup defs 'paper-width))) | 892 (paper-width (convert (ly:output-def-lookup defs 'paper-width))) |
877 (paper-height (convert (ly:output-def-lookup defs 'paper-height))) | 893 (paper-height (convert (ly:output-def-lookup defs 'paper-height))) |
878 (w (if landscape paper-height paper-width)) | 894 (w (if landscape paper-height paper-width)) |
(...skipping 30 matching lines...) Expand all Loading... |
909 | 925 |
910 lilypond -dbackend=eps FILE | 926 lilypond -dbackend=eps FILE |
911 | 927 |
912 If you have cut & pasted a lilypond fragment from a webpage, be sure | 928 If you have cut & pasted a lilypond fragment from a webpage, be sure |
913 to only remove anything before | 929 to only remove anything before |
914 | 930 |
915 %% **************************************************************** | 931 %% **************************************************************** |
916 %% Start cut-&-pastable-section | 932 %% Start cut-&-pastable-section |
917 %% **************************************************************** | 933 %% **************************************************************** |
918 "))) | 934 "))) |
OLD | NEW |