OLD | NEW |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 2008--2020 Reinhold Kainhofer <reinhold@kainhofer.com> | 3 ;;;; Copyright (C) 2008--2020 Reinhold Kainhofer <reinhold@kainhofer.com> |
4 ;;;; | 4 ;;;; |
5 ;;;; LilyPond is free software: you can redistribute it and/or modify | 5 ;;;; LilyPond is free software: you can redistribute it and/or modify |
6 ;;;; it under the terms of the GNU General Public License as published by | 6 ;;;; it under the terms of the GNU General Public License as published by |
7 ;;;; the Free Software Foundation, either version 3 of the License, or | 7 ;;;; the Free Software Foundation, either version 3 of the License, or |
8 ;;;; (at your option) any later version. | 8 ;;;; (at your option) any later version. |
9 ;;;; | 9 ;;;; |
10 ;;;; LilyPond is distributed in the hope that it will be useful, | 10 ;;;; LilyPond is distributed in the hope that it will be useful, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 (half-stem-thickness (/ (* grob-stem-thickness line-thickness) 2)) | 80 (half-stem-thickness (/ (* grob-stem-thickness line-thickness) 2)) |
81 (raw-length (if stem-up upflag-length downflag-length)) | 81 (raw-length (if stem-up upflag-length downflag-length)) |
82 (angle (if stem-up upflag-angle downflag-angle)) | 82 (angle (if stem-up upflag-angle downflag-angle)) |
83 (flag-length (+ (* raw-length factor) half-stem-thickness)) | 83 (flag-length (+ (* raw-length factor) half-stem-thickness)) |
84 (flag-end (polar->rectangular flag-length angle)) | 84 (flag-end (polar->rectangular flag-length angle)) |
85 (thickness (* flag-thickness factor)) | 85 (thickness (* flag-thickness factor)) |
86 (thickness-offset (cons 0 (* -1 thickness dir))) | 86 (thickness-offset (cons 0 (* -1 thickness dir))) |
87 (spacing (* -1 flag-spacing factor dir )) | 87 (spacing (* -1 flag-spacing factor dir )) |
88 (start (cons (- half-stem-thickness) (* half-stem-thickness dir))) | 88 (start (cons (- half-stem-thickness) (* half-stem-thickness dir))) |
89 (raw-points | 89 (raw-points |
90 (list | 90 (list |
91 '(0 . 0) | 91 '(0 . 0) |
92 flag-end | 92 flag-end |
93 (offset-add flag-end thickness-offset) | 93 (offset-add flag-end thickness-offset) |
94 thickness-offset)) | 94 thickness-offset)) |
95 (points (map (lambda (coord) (offset-add coord start)) raw-points)) | 95 (points (map (lambda (coord) (offset-add coord start)) raw-points)) |
96 (stencil (ly:round-filled-polygon points half-stem-thickness)) | 96 (stencil (ly:round-filled-polygon points half-stem-thickness)) |
97 ;; Log for 1/8 is 3, so we need to subtract 3 | 97 ;; Log for 1/8 is 3, so we need to subtract 3 |
98 (flag-stencil (buildflag stencil (- log 3) stencil spacing)) | 98 (flag-stencil (buildflag stencil (- log 3) stencil spacing)) |
99 (stroke-style (ly:grob-property grob 'stroke-style))) | 99 (stroke-style (ly:grob-property grob 'stroke-style))) |
100 (cond ((eq? (ly:grob-property grob 'style) 'no-flag) | 100 (cond ((eq? (ly:grob-property grob 'style) 'no-flag) |
101 empty-stencil) | 101 empty-stencil) |
102 ((equal? stroke-style "grace") | 102 ((equal? stroke-style "grace") |
103 (add-stroke-straight flag-stencil grob | 103 (add-stroke-straight flag-stencil grob |
104 dir log | 104 dir log |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 (let* ((stem-grob (ly:grob-parent grob X)) | 238 (let* ((stem-grob (ly:grob-parent grob X)) |
239 (flag-style-symbol (ly:grob-property grob 'style)) | 239 (flag-style-symbol (ly:grob-property grob 'style)) |
240 (flag-style (if (symbol? flag-style-symbol) | 240 (flag-style (if (symbol? flag-style-symbol) |
241 (symbol->string flag-style-symbol) | 241 (symbol->string flag-style-symbol) |
242 ""))) | 242 ""))) |
243 (cond | 243 (cond |
244 ((equal? flag-style "") (normal-flag grob)) | 244 ((equal? flag-style "") (normal-flag grob)) |
245 ((equal? flag-style "mensural") (mensural-flag grob)) | 245 ((equal? flag-style "mensural") (mensural-flag grob)) |
246 ((equal? flag-style "no-flag") empty-stencil) | 246 ((equal? flag-style "no-flag") empty-stencil) |
247 (else ((glyph-flag flag-style) grob))))) | 247 (else ((glyph-flag flag-style) grob))))) |
248 | |
OLD | NEW |