[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: Display bezier control-points
From: |
Thomas Morley |
Subject: |
Re: Feature request: Display bezier control-points |
Date: |
Fri, 4 May 2012 03:09:38 +0200 |
Hi Urs,
> I would be very happy about one or two more features (that I unfortunately
> can't implement myself:
> - highlight (and separate from the music) the crosses through a color
> - possibly adding a connecting (very thin) line, making it even more
> intuitive
>
> Best
> Urs
how about:
\version "2.14.2"
#(define (make-cross-stencil coords)
(ly:stencil-add
(make-line-stencil 0.1 (- (car coords) 0.2) (- (cdr coords) 0.2)
(+ (car coords) 0.2) (+ (cdr coords) 0.2))
(make-line-stencil 0.1 (- (car coords) 0.2) (+ (cdr coords) 0.2)
(+ (car coords) 0.2) (- (cdr coords) 0.2))))
#(define (display-control-points line)
(lambda (grob)
(let ((stencil (ly:slur::print grob))
(cps (ly:grob-property grob 'control-points)))
(ly:stencil-add stencil
(ly:stencil-in-color
(make-cross-stencil (second cps))
1 0 0)
(ly:stencil-in-color
(make-cross-stencil (third cps))
1 0 0)
(if (eq? line #t)
(make-line-stencil 0.05 (car (second cps)) (cdr (second cps))
(car (third cps)) (cdr (third cps)))
empty-stencil)
)
)))
\relative c'' {
\override Slur #'stencil = #(display-control-points #t)
c2( d e f)
}
HTH,
Harm
- Feature request: Display bezier control-points, Urs Liska, 2012/05/03
- Re: Feature request: Display bezier control-points, Ralph Palmer, 2012/05/03
- Re: Feature request: Display bezier control-points, David Nalesnik, 2012/05/03
- Re: Feature request: Display bezier control-points, David Nalesnik, 2012/05/03
- Re: Feature request: Display bezier control-points, Urs Liska, 2012/05/03
- Re: Feature request: Display bezier control-points, Urs Liska, 2012/05/03
- Re: Feature request: Display bezier control-points,
Thomas Morley <=
- Re: Feature request: Display bezier control-points, David Nalesnik, 2012/05/03
- Re: Feature request: Display bezier control-points, Urs Liska, 2012/05/04
- Re: Feature request: Display bezier control-points, Thomas Morley, 2012/05/04
- Re: Feature request: Display bezier control-points, David Nalesnik, 2012/05/03
- Re: Feature request: Display bezier control-points, Urs Liska, 2012/05/04
- Re: Feature request: Display bezier control-points, James, 2012/05/04
- Re: Feature request: Display bezier control-points, Urs Liska, 2012/05/04