[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 19:08:23 -0500 |
Hi Urs,
> It would be a really valuable feature if one could let LilyPond display
> > the control-points of a bezier curve.
> > I would imagine something like a cross or a point at the middle two
> > control-points.
>
I think this would be very helpful, so that you can visualize exactly what
these control-points are that you're setting. (It must be a common
misconception that they are points on the actual curve.)
I'm not sure what impact this may have on the layout, but you could do
something like the following:
\version "2.15.37"
#(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
(lambda (grob)
(let ((stencil (ly:slur::print grob))
(cps (ly:grob-property grob 'control-points)))
(ly:stencil-add stencil
(make-cross-stencil (second cps))
(make-cross-stencil (third cps))))))
\relative c'' {
\override Slur #'stencil = #display-control-points
c( d e f)
}
Hope you find this helpful!
-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 <=
- 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, 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