[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gets rid of length in the docs. (issue 4965053)
From: |
Dmytro O. Redchuk |
Subject: |
Re: Gets rid of length in the docs. (issue 4965053) |
Date: |
Tue, 30 Aug 2011 17:14:18 +0300 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue 30 Aug 2011, 16:08 Mike Solomon wrote:
> Currently, the stem stencil function is doable in Scheme, which means that
> the result from 2.15.8 can be achieved via :
Thank you for your work! I've "bookmarked" this hint/thread, of course.
I am still wondering, is stem the single grob so far, which 'Y-extent property
"overrides" its appearance? Or other grobs will be (or already are) changed,
too?
Sorry for dumb questions, if any. Thank you for bearing with me.)
> #(define (my-stem grob)
> (let*
> ((dir (ly:grob-property grob 'direction))
> (half-space (* 0.5 (ly:staff-symbol-staff-space grob)))
> (y1 (* half-space (ly:stem::calc-stem-begin-position grob)))
> (y2 (* half-space (ly:stem::calc-stem-end-position grob)))
> (half-thick (* (* (ly:grob-property grob 'thickness)
> (ly:staff-symbol-line-thickness grob))
> 0.5))
> (beam (ly:grob-object grob 'beam))
> (y2 (+ y2 (if (null? beam)
> 0.0
> (* dir (* (ly:grob-property beam
> 'beam-thickness)
> half-space)))))
> (my-down (if (< y2 y1) y2 y1))
> (my-up (if (< y2 y1) y1 y2))
> (blot (ly:paper-get-number (ly:grob-layout grob) 'blot-diameter)))
> (ly:make-stencil `(round-filled-box ,half-thick
> ,half-thick
> ,(- my-down)
> ,my-up
> ,blot)
> (cons (- half-thick) half-thick)
> (cons my-down my-up))))
>
> {
> c''_\fermata
> \override Stem #'Y-extent = #'(-10 . 0)
> \override Stem #'stencil = #my-stem
> c''_\fermata
> }
>
> I'm not sure of a good way to deal with this from a UI perspective, but at
> least the function above allows you to achieve the result you're talking
> about with only one extra override
--
Dmytro O. Redchuk "Easy to use" is easy to say.
Bug Squad -- Jeff Garbers
- Re: Gets rid of length in the docs. (issue 4965053), (continued)
- Re: Gets rid of length in the docs. (issue 4965053), Graham Percival, 2011/08/29
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/29
- Re: Gets rid of length in the docs. (issue 4965053), Trevor Daniels, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Graham Percival, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Graham Percival, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Dmytro O. Redchuk, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Dmytro O. Redchuk, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053),
Dmytro O. Redchuk <=
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Trevor Daniels, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Trevor Daniels, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Keith OHara, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Mike Solomon, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), David Kastrup, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Trevor Daniels, 2011/08/30
- Re: Gets rid of length in the docs. (issue 4965053), Reinhold Kainhofer, 2011/08/30