[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vertical alignment error
From: |
David Kastrup |
Subject: |
Re: vertical alignment error |
Date: |
Sat, 04 Aug 2012 06:48:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Ian Hulin <address@hidden> writes:
> On 03/08/12 20:40, Marc Hohl wrote:
>> Hello list,
>>
>> I tried to simplify the make-...-bar-line functions recently
>> defined in scm/bar-line.scm.
>>
>> However, if I replace the definition
>>
>> (define (make-simple-bar-line grob extent thickness) (let ((blot
>> (if rounded (layout-blot-diameter grob) 0)))
>>
>> (ly:round-filled-box (cons 0 thickness) extent blot)))
>>
>> with
>>
>> (define (make-simple-bar-line grob extent thickness) (let* ((extent
>> (ly:grob-property grob 'bar-extent)) (blot (if rounded
>> (layout-blot-diameter grob) 0)))
> ;; this looks odd, shouldn't the syntax be (if (condition) (then-bit)
> ;; (else-bit)) ?
> ;;
No. It is (if <condition> <then-bit> <else-bit>), namely if there are
any parentheses, they are part of the respective expression.
The <condition> is "rounded", short for "(not (eq? rounded #f))", the
<then-bit> is "(layout-blot-diameter grob)", and the <else-bit> is "0".
--
David Kastrup