2006-10-09 Han-Wen Nienhuys <hanwen@lilypond.org>
+ * scm/stencil.scm (circle-stencil): don't center stencil argument,
+ instead: move circle.
+
* scm/define-grobs.scm (all-grob-descriptions): set
allow-loose-spacing for PaperColumn and NonMusicalPaperColumn.
font-interface
text-interface))))))
+ (NonMusicalPaperColumn
+ . (
+ (allow-loose-spacing . #t)
+ (axes . (0))
+ (before-line-breaking . ,ly:paper-column::before-line-breaking)
+ (X-extent . ,ly:axis-group-interface::width)
+ ;; (stencil . ,ly:paper-column::print)
+
+ (non-musical . #t)
+ (line-break-permission . allow)
+ (page-break-permission . allow)
+
+ ;; debugging stuff: print column number.
+ ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
+
+ (meta . ((class . Paper_column)
+ (interfaces . (paper-column-interface
+ axis-group-interface
+ spaceable-grob-interface))))))
+
(NoteCollision
. (
(axes . (0 1))
(meta . ((class . Spanner)
(interfaces . (slur-interface))))))
- (NonMusicalPaperColumn
- . (
- (allow-loose-spacing . #t)
- (axes . (0))
- (before-line-breaking . ,ly:paper-column::before-line-breaking)
- (X-extent . ,ly:axis-group-interface::width)
- ;; (stencil . ,ly:paper-column::print)
-
- (non-musical . #t)
- (line-break-permission . allow)
- (page-break-permission . allow)
-
- ;; debugging stuff: print column number.
- ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
- (meta . ((class . Paper_column)
- (interfaces . (paper-column-interface
- axis-group-interface
- spaceable-grob-interface))))))
(PercentRepeat
. (
"Draw a circle around @var{arg}. Use @code{thickness},
@code{circle-padding} and @code{font-size} properties to determine line
thickness and padding around the markup."
+
(let* ((th (chain-assoc-get 'thickness props 0.1))
(size (chain-assoc-get 'font-size props 0))
(pad
(y-ext (ly:stencil-extent stencil 1))
(diameter (max (- (cdr x-ext) (car x-ext))
(- (cdr y-ext) (car y-ext))))
- (radius (+ (/ diameter 2) padding thickness)))
+ (radius (+ (/ diameter 2) padding thickness))
+ (circle (make-circle-stencil radius thickness #f)))
+
(ly:stencil-add
- (centered-stencil stencil) (make-circle-stencil radius thickness #f))))
+ stencil
+ (ly:stencil-translate circle
+ (cons
+ (interval-center x-ext)
+ (interval-center y-ext))))))
+
(define-public (fontify-text font-metric text)
"Set TEXT with font FONT-METRIC, returning a stencil."