From: Han-Wen Nienhuys Date: Fri, 29 Oct 2004 00:57:30 +0000 (+0000) Subject: add 'resolution to ly:get-option argument X-Git-Tag: release/2.3.25~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5398c1592834132478e75ec17c2806e36b7a98fb;p=lilypond.git add 'resolution to ly:get-option argument list. --- diff --git a/ChangeLog b/ChangeLog index 287af839fd..62667a79a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-29 Han-Wen Nienhuys + + * lily/scm-option.cc: add 'resolution to ly:get-option argument + list. + 2004-10-28 Han-Wen Nienhuys * lily/stencil-scheme.cc (LY_DEFINE): add ly:stencil-origin @@ -78,6 +83,8 @@ 2004-10-25 Han-Wen Nienhuys + * VERSION: 2.3.24 + * scm/define-context-properties.scm (all-user-translation-properties): add verticallySpacedContexts. diff --git a/VERSION b/VERSION index acffe86084..217cde2866 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=3 -PATCH_LEVEL=24 +PATCH_LEVEL=25 MY_PATCH_LEVEL= diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index 8a22a8ec25..5621ab1185 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -101,10 +101,10 @@ violoncello = \relative c' { } -% ugf, must be here? \paper { indent=10.0\mm linewidth=150.0\mm + raggedbottom = ##t } #(set-global-staff-size 16) diff --git a/lily/scm-option.cc b/lily/scm-option.cc index 5da31ef240..6118d561d0 100644 --- a/lily/scm-option.cc +++ b/lily/scm-option.cc @@ -32,6 +32,9 @@ /* Write midi as formatted ascii stream? */ bool midi_debug_global_b; +int preview_resolution_global = 90; + + /* General purpose testing flag */ int testing_level_global; @@ -122,6 +125,8 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val), /* Needs to be reset for each file that uses this option. */ lily_1_8_compatibility_used = false; } + else if (var == ly_symbol2scm ("resolution")) + preview_resolution_global = robust_scm2int (val, 90); else if (var == ly_symbol2scm ("new-relative")) lily_1_8_relative = false; else @@ -143,6 +148,8 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var), "Report whether old-relative compatibility mode is used\n" "@item verbose\n" "Report whether we are running in verbose mode\n" + "@item resolution\n" + "Resolution for the PNG output." "@end table\n" "\n") { @@ -156,6 +163,8 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var), o = ly_bool2scm (lily_1_8_relative); else if (var == ly_symbol2scm ("verbose")) o = ly_bool2scm (verbose_global_b); + else if ( var == ly_bool2scm ("resolution")) + o = scm_from_int (preview_resolution_global); else warning (_f ("No such internal option: %s", ly_scm2string (var))); return o; diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index c487c36b91..f4752253b6 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -289,7 +289,9 @@ (let* ((defs (ly:paper-book-paper book)) (resolution (ly:output-def-lookup defs 'pngresolution))) - (postscript->png (if (number? resolution) resolution 90) + (postscript->png (if (number? resolution) resolution + + (ly:get-option 'preview-resolution)) name))) (define-public (convert-to-dvi book name) diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index 93c5fedbc3..671eca81b8 100644 --- a/scm/framework-tex.scm +++ b/scm/framework-tex.scm @@ -267,7 +267,9 @@ (let* ((defs (ly:paper-book-paper book)) (resolution (ly:output-def-lookup defs 'pngresolution))) (postscript->png - (if (number? resolution) resolution 90) + (if (number? resolution) + resolution + (ly:get-option 'preview-resolution))b (string-append (basename name ".tex") ".ps")))) (define-public (convert-to-ps book name)