[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: Display bezier control-points
From: |
David Nalesnik |
Subject: |
Re: Feature request: Display bezier control-points |
Date: |
Thu, 3 May 2012 21:14:34 -0500 |
Hi Harm,
> 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)
> }
>
Looks great! Makes this even more fun to play around with :)
-David
- 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, 2012/05/03
- Re: Feature request: Display bezier control-points,
David Nalesnik <=
- 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