;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 2000--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Copyright (C) 2000--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
"
@cindex paths, drawing
@cindex drawing paths
-Draws a path with line thickness @var{thickness} according to the
+Draws a path with line @var{thickness} according to the
directions given in @var{commands}. @var{commands} is a list of
lists where the @code{car} of each sublist is a drawing command and
the @code{cdr} comprises the associated arguments for each command.
-Line-cap styles and line-join styles may be customized by
-overriding the @code{line-cap-style} and @code{line-join-style}
-properties, respectively. Available line-cap styles are
-@code{'butt}, @code{'round}, and @code{'square}. Available
-line-join styles are @code{'miter}, @code{'round}, and
-@code{'bevel}.
-
-The property @code{filled} specifies whether or not the path is
-filled with color.
-
There are seven commands available to use in the list
@code{commands}: @code{moveto}, @code{rmoveto}, @code{lineto},
@code{rlineto}, @code{curveto}, @code{rcurveto}, and
Note that a sequence of commands @emph{must} begin with a
@code{moveto} or @code{rmoveto} to work with the SVG output.
+Line-cap styles and line-join styles may be customized by
+overriding the @code{line-cap-style} and @code{line-join-style}
+properties, respectively. Available line-cap styles are
+@code{'butt}, @code{'round}, and @code{'square}. Available
+line-join styles are @code{'miter}, @code{'round}, and
+@code{'bevel}.
+
+The property @code{filled} specifies whether or not the path is
+filled with color.
+
@lilypond[verbatim,quote]
samplePath =
#'((moveto 0 0)
\\markup {
\\path #0.25 #samplePath
+
+ \\override #'(line-join-style . miter) \\path #0.25 #samplePath
+
+ \\override #'(filled . #t) \\path #0.25 #samplePath
}
@end lilypond"
(let* ((half-thickness (/ thickness 2))
(define-markup-command (normal-size-super layout props arg)
(markup?)
#:category font
- #:properties ((baseline-skip))
+ #:properties ((font-size 0))
"
@cindex setting superscript in standard font size
@end lilypond"
(ly:stencil-translate-axis
(interpret-markup layout props arg)
- (* 0.33 baseline-skip) Y))
+ (* 1.0 (magstep font-size)) Y))
(define-markup-command (super layout props arg)
(markup?)
#:category font
- #:properties ((font-size 0)
- (baseline-skip))
+ #:properties ((font-size 0))
"
@cindex superscript text
layout
(cons `((font-size . ,(- font-size 3))) props)
arg)
- (* 0.33 baseline-skip)
+ (* 1.0 (magstep font-size)) ; original font-size
Y))
(define-markup-command (translate layout props offset arg)
(define-markup-command (sub layout props arg)
(markup?)
#:category font
- #:properties ((font-size 0)
- (baseline-skip))
+ #:properties ((font-size 0))
"
@cindex subscript text
layout
(cons `((font-size . ,(- font-size 3))) props)
arg)
- (* -0.25 baseline-skip)
+ (* -0.75 (magstep font-size)) ; original font-size
Y))
(define-markup-command (normal-size-sub layout props arg)
(markup?)
#:category font
- #:properties ((baseline-skip))
+ #:properties ((font-size 0))
"
@cindex setting subscript in standard font size
@end lilypond"
(ly:stencil-translate-axis
(interpret-markup layout props arg)
- (* -0.25 baseline-skip)
+ (* -0.75 (magstep font-size))
Y))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;