[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Triangle Arrow shape above Staff

From: Pierre Perol-Schneider
Subject: Re: Triangle Arrow shape above Staff
Date: Tue, 13 Nov 2018 00:51:28 +0100

Hi Reggie,
For the triangle, see,1279.msg7040.html#msg7040
e.g. :

\version "2.19.80"

#(define-markup-command (n-agon layout props corners radius arg)
  (number? number? markup?)
  #:category graphic
  #:properties ((thickness 1))
  (let* ((th (* (ly:output-def-lookup layout 'line-thickness)
         (alpha-step (if (= corners 0) 99 (/ (* 2 PI) corners)))
         (alpha-start (if (>= radius 0) (/ alpha-step 2) 0))
           (let loop ((alpha alpha-start))
             (if (> alpha (* 2 PI))
                 (cons (* (abs radius) (sin alpha)) (cons (- 0 (* (abs radius) (cos alpha)))
                    (loop (+ alpha alpha-step)))))))
         (m (interpret-markup layout props arg))
         (x-ext (ly:stencil-extent m X))
         (y-ext (ly:stencil-extent m Y)))

    (ly:stencil-add m
         (if (equal? polypoints '())
            (ly:make-stencil (list 'circle radius th #f))
            (ly:make-stencil `(polygon ',polypoints  ,th #f)))
         (cons (/ (cdr x-ext) 2) (/ (cdr y-ext) 2))))))

  \mark\markup\n-agon #3 #-3 \bold\fontsize #1.5 "3"

For the arrow, maybe you'll find something interesting here:

HTH, cheers,

Le lun. 12 nov. 2018 à 23:11, Reggie <address@hidden> a écrit :
How do you put a triangle shape with duration beat number inside above staff
in 2.19 please as well as a standard conductor arrow thank you I cannot find
how to.

shapee.png <

Sent from:

lilypond-user mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]