test-output-distance
config-*.hh
config-*.make
+*.graph
+*.stacks
+*.profile
@end ignore
+All line spanners are more flexible now in the configuration of their
+end points. This includes glissando, voice followers, text crescendos
+and other text spanners.
+
+@lilypond
+\relative c'' {
+ \override Glissando #'bound-details #'right #'text = \markup { \hcenter \bold down }
+ \override Glissando #'bound-details #'right #'Y = #-4
+ \override Glissando #'bound-details #'right #'padding = #0.0
+ \override Glissando #'bound-details #'left #'arrow = ##t
+ \override Glissando #'bound-details #'left #'padding = #5.0
+ \override Glissando #'style = #'trill
+
+ c1 \glissando c'
+}
+@end lilypond
+
+This feature was sponsored by Trevor Bača.
+
+
@item
Notes or rests, such as a typical end note, that fill an entire
measure are preceded by some more space.
@menu
* Text scripts::
+* Text and line spanners::
* Text spanners::
* Text marks::
* Text markup::
Program reference: @internalsref{TextScript}.
+@node Text and line spanners
+@subsection Text and line spanners
+
+Some performance indications, e.g., @i{rallentando} and
+@i{accelerando} and @i{trills} are written as text and are extended
+over many measures with lines, sometimes dotted or wavy.
+
+These all use the same routines as the glissando for drawing the texts
+and the lines, and tuning their behavior is therefore also done in the
+same way. It is done with a spanner, and the routine responsible for
+drawing the spanners is @code{ly:line-interface::print}. This
+routine creates determines the exact location of the two @i{span
+points} and draws a line in between, in the style requested.
+
+Here is an example of the different line styles available, and how to
+tune them.
+
+@lilypond[relative=2,ragged-right,verbatim,fragment]
+d2 \glissando d'2
+\once \override Glissando #'dash-fraction = #0.5
+d,2 \glissando d'2
+\override Glissando #'style = #'dotted-line
+d,2 \glissando d'2
+\override Glissando #'style = #'zigzag
+d,2 \glissando d'2
+\override Glissando #'style = #'trill
+d,2 \glissando d'2
+@end lilypond
+
+The information that determines the end-points is computed on-the-fly
+for every graphic object, but it is possible to override these.
+
+@lilypond[relative=2,ragged-right,verbatim,fragment]
+e2 \glissando f
+\once \override Glissando #'bound-details #'right #'Y = #-2
+e2 \glissando f
+@end lilypond
+
+The @code{Glissando} object, like any other using the
+@code{ly:line-interface::print} routine, carries a nested
+association list. In the above statement, the value for @code{Y}
+is set to @code{-2} for association list corresponding to the right
+end point. Of course, it is also possible to adjust the left side with
+@code{left} instead of @code{right}.
+
+If @code{Y} is not set, the value is computed from the vertical
+position of right attachment point of the spanner.
+
+In case of a line break, the values for the span-points are extended
+with contents of the @code{left-broken} and @code{right-broken}
+sublists, for example
+
+@lilypond[relative=2,ragged-right,verbatim,fragment]
+\override Glissando #'breakable = ##T
+\override Glissando #'bound-details #'right-broken #'Y = #-3
+c1 \glissando \break
+f1
+@end lilypond
+
+The following properties can be used for the
+
+@table @code
+@item Y
+This sets the Y-coordinate of the end point, in staff space. By
+default, it is the center of the bound object, so for a glissando it
+points to the vertical center of the note head.
+
+For horizontal spanners, such as text spanner and trill spanners, it
+is hardcoded to 0.
+
+@item attach-dir
+This determines where the line starts and ends in X-direction,
+relative to the bound object. So, a value of @code{-1} (or
+@code{LEFT}) makes the line start/end at the left side of the note
+head it is attached to.
+
+@item X
+This is the absolute coordinate of the end point. It is usually
+computed on the fly, and there is little use in overriding it.
+
+@item stencil
+Line spanners may have symbols at the beginning or end, which is
+contained in this sub-property. This is for internal use, it is
+recommended to use @code{text}.
+
+@item text
+This is a markup that is evaluated to yield stencil. It is
+used to put @i{cresc.} and @i{tr} on horizontal spanners.
+
+@lilypond[quote,ragged-right,fragment,relative=2,verbatim]
+\override TextSpanner #'bound-details #'left #'text
+ = \markup { \small \bold Slower }
+c2\startTextSpan b c a\stopTextSpan
+@end lilypond
+
+@item stencil-align-dir-y
+@item stencil-offset
+Without setting this, the stencil is simply put there at the
+end-point, as defined by the @code{X} and @code{Y} sub properties.
+Setting either @code{stencil-align-dir-y} or @code{stencil-offset}
+will move the symbol at the edge relative to the end point of the line
+
+@lilypond[relative=1,fragment,verbatim]
+\override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #DOWN
+\override TextSpanner #'bound-details #'right #'stencil-align-dir-y = #UP
+
+\override TextSpanner #'bound-details #'left #'text = #"gggg"
+\override TextSpanner #'bound-details #'right #'text = #"hhhh"
+c4^\startTextSpan c c c \stopTextSpan
+@end lilypond
+
+@item arrow
+Setting this sub property to @code{#t} produce an arrowhead at the end
+of the line.
+
+@item padding
+This sub property controls the space between the specified end-point
+of the line and the actual end. Without padding, a glissando would
+start and end in the center of each note head.
+
+@end table
+
+@seealso
+
+Program reference: @internalsref{TextSpanner},
+@internalsref{Glissando}, @internalsref{VoiceFollower},
+@internalsref{TrillSpanner}, @internalsref{line-spanner-interface}.
+
+Examples:
+@inputfileref{input/@/regression,dynamics@/-text@/-spanner@/-padding.ly}.
+@inputfileref{input/@/regression,glissando@/-broken@/.ly}.
+@inputfileref{input/@/regression,line@/-arrows@/.ly}.
+@inputfileref{input/@/regression,line@/-style@/.ly}.
+@inputfileref{input/@/regression,text@/-spanner@/.ly}.
+@inputfileref{input/@/regression,text@/-spanner@/.ly}.
+
+
@node Text spanners
@subsection Text spanners
@cindex stem, cross staff
@cindex distance between staves in piano music
-The distance between the two staves is the same for all systems in the
-score. It is possible to override this per system, but it does require
-an arcane command incantation. See
-@inputfileref{input/@/test,piano@/-staff@/-distance@/.ly}.
-
@node Automatic staff changes
@subsection Automatic staff changes
staff, or vice versa.
@lilypond[ragged-right,verbatim,quote]
-stemExtend = \once \override Stem #'length = #22
+stemExtend = {
+ \once \override Stem #'length = #10
+ \once \override Stem #'cross-staff = ##t
+}
noFlag = \once \override Stem #'flag-style = #'no-flag
\new PianoStaff <<
\new Staff {
@subsubheading MacOS X
If you double click LilyPond.app, it will open with an example
-file. Save it, for example, to @file{test.ly} on your Desktop, and
+file. Save it, for example, to @file{test.ly} on your Desktop, and
then process it with the menu command @samp{Compile > Typeset File}.
The resulting PDF file will be displayed on your screen.
@file{.ly} file, right-click on it and select @qq{Edit source}.
If you double-click in the LilyPond icon on the Desktop, it will open
-a simple text editor with an example file. Save it, for example, to
+a simple text editor with an example file. Save it, for example, to
@file{test.ly} on your Desktop, and then double-click on the file to
process it. After some seconds, you will get a file @file{test.pdf}
on your desktop. Double-click on this PDF file to view the typeset
\clef treble
c1
\clef alto
- c1
+ c1
\clef tenor
c1
\clef bass
@lilypond[quote,ragged-right,verbatim,fragment,relative=2]
\times 2/3 { f8 g a }
\times 2/3 { c r c }
-\times 2/3 { f,8 g16 a g a }
+\times 2/3 { f,8 g16[ a g a] }
\times 2/3 { d4 a8 }
@end lilypond
keyword @code{\appoggiatura} or @code{\acciaccatura}
@lilypond[quote,ragged-right,verbatim,fragment,relative=2]
-c2 \grace { a32 b} c2
+c2 \grace { a32[ b] } c2
c2 \appoggiatura b16 c2
c2 \acciaccatura b16 c2
@end lilypond
@lilypond[quote,ragged-right,verbatim]
\relative c'' {
a4 e c8 e r4
- b2 c4( d)
+ b2 c4( d)
}
@end lilypond
<<
\relative c'' {
a4 e c8 e r4
- b2 c4( d)
+ b2 c4( d)
}
\addlyrics { One day this shall be free }
>>
<<
\relative c'' {
a4 e c8 e r4
- b2 c4( d)
+ b2 c4( d)
}
\addlyrics { One day this shall be free __ }
>>
@cindex chords
@cindex chord names
-@c TODO: revise this, \chords { } is shorter and more intuitive.
-@c I need help for this. -gp
-
In popular music it is common to denote accompaniment with chord names.
Such chords can be entered like notes,
\chordmode { c2 f4. g8 }
@end lilypond
-@noindent
Now each pitch is read as the root of a chord instead of a note.
-This mode is switched on with @code{\chordmode}
-
-Other chords can be created by adding modifiers after a colon. The
-following example shows a few common modifiers
+This mode is switched on with @code{\chordmode}. Other chords can be
+created by adding modifiers after a colon. The
+following example shows a few common modifiers:
@lilypond[quote,verbatim,ragged-right]
\chordmode { c2 f4:m g4:maj7 gis1:dim7 }
line for themselves. This is achieved by using @code{\chords} instead
of @code{\chordmode}. This uses the same syntax as @code{\chordmode},
but renders the notes in a @code{ChordNames} context, with the
-following result.
+following result:
@lilypond[quote,verbatim,ragged-right]
\chords { c2 f4.:m g4.:maj7 gis8:dim7 }
@cindex lead sheet
When put together, chord names, lyrics and a melody form
-a lead sheet, for example,
+a lead sheet,
@lilypond[quote,verbatim,ragged-right]
-% FIXME: this melody needs to be changed. See my new example in 2.4.1. -gp
<<
- \chords { r2 c:sus4 f }
- \relative {
- r4 c' \times 2/3 { f g g }
- \times 2/3 { g4( a2) }
+ \chords { c2 g:sus4 f e }
+ \relative c'' {
+ a4 e c8 e r4
+ b2 c4( d)
}
- \addlyrics { I want to break free __ }
+ \addlyrics { One day this shall be free __ }
>>
@end lilypond
+
+@moreinfo
+@quotation
A complete list of modifiers and other options for layout can be found
in @ref{Chords}.
+@end quotation
@node Final touches
} >>
@end lilypond
-To make sure that the just blanked stem doesn't sqeeuze the too much
+To make sure that the just blanked stem doesn't squeeze the too much
tie, we also lengthen the stem, by setting the @code{length} to
@code{8},
@example
\paper @{
-between-system-padding = #0.1
-between-system-space = #0.1
-ragged-last-bottom = ##f
-ragged-bottom = ##f
+ between-system-padding = #0.1
+ between-system-space = #0.1
+ ragged-last-bottom = ##f
+ ragged-bottom = ##f
@}
@end example
@example
\paper @{
-system-count = #10
+ system-count = #10
@}
@end example
#})
\relative c'' {
-c2 e
-\tempoMark #3.0 #"Allegro"
-g c
+ c2 e
+ \tempoMark #3.0 #"Allegro"
+ g c
}
@end lilypond
@node Working on LilyPond projects
@chapter Working on LilyPond projects
-This section explains a how to solve or avoid certain common
+This section explains how to solve or avoid certain common
problems. If you have programming experience, many of these
tips may seem obvious, but it is still advisable to read
this chapter.
@node Minimal examples
@section Minimal examples
-A minimal example is an example which is small as possible. These
+A minimal example is an example which is as small as possible. These
examples are much easier to understand than long examples. Minimal
examples are used for
@itemize
@item Include the @code{\version} number.
@item If possible, use @code{\paper@{ ragged-right=##t @}} at the
-top of your example.
+top of your example.
@end itemize
The whole point of a minimal example is to make it easy to read:
@itemize
@item Avoid using complicated notes, keys, or time signatures, unless you
-wish to demonstrate something is about the behavior of those items.
+wish to demonstrate something is about the behavior of those items.
@item Do not use \override commands unless that is the point of the
example.
@end itemize
patches for third party programs
Documentation/
bibliography/ .bib files with references to books and articles
- misc Old announcements, ChangeLogs and NEWS
+ misc/ Old announcements, ChangeLogs and NEWS
pictures/ The logo
topdocs/ Sources for the toplevel READMEs
(README.txt, INSTALL.txt, NEWS.txt etc.)
user/ User manuals
+ po/ translated manual node names
+ fr/ docs translated to French.
buildscripts/ Scripts for the build process
cygwin/ Cygwin (Windows) package support
debian/ Debian package support
flower/ A simple c++ library
include/
input/ Music input examples
- bugs/ Buggy or problematic notation
mutopia/ Real music, more at www.mutopiaproject.org
- no-notation/ Examples that do not produce output
regression/ Testing of features, one test per file
test/ Tips and tricks
tutorial/ Examples from the tutorial
CONTRIBUTORS
Rune Zedeler
+Maximilian Albert
SPONSORS
Mike Amundsen
-
+Trevor Bača
BUG HUNTERS/SUGGESTIONS
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=11
-PATCH_LEVEL=13
+PATCH_LEVEL=15
MY_PATCH_LEVEL=
and not text.startswith ('(define (')):
return 0
+ if text.startswith ('(use-modules '):
+ return 0
+
if (text.startswith ('(define-public ')
and not text.startswith ('(define-public (')):
return 0
if options.uncovered:
chunks = filter_uncovered (chunks)
- chunks = [(c.uncovered_score (), c) for c in chunks]
+ chunks = [(c.uncovered_score (), c) for c in chunks if c.uncovered_score() > 0]
elif options.hotspots:
chunks = [((c.coverage_count, -c.length()), c) for c in chunks]
\change Staff=bass
- \once\override TextScript #'extra-offset = #'(-3 . -4) %tweak
+% \once\override TextScript #'extra-offset = #'(-3 . -4) %tweak
cis,16^2(^\markup {\small \italic "m.d." }\sustainUp
<fis fis,>8 <e! e,!>
#(set-octavation 1)
- \once\override TextScript #'extra-offset = #'(-3 . -2) %tweak
+% \once\override TextScript #'extra-offset = #'(-3 . -2) %tweak
\tieUp
cis''''4^\markup { \small \italic "m.g." }\arpeggio~
s8
s16 s s
s32 s
- \once\override Dynamics.Hairpin #'extra-offset = #'(0 . 2) %tweak
+ %\once\override Dynamics.Hairpin #'extra-offset = #'(0 . 2) %tweak
s\> s
s32 s s s\!
\emptyText
| %5
s2-"a tempo" s8
- \once\override Dynamics.Hairpin #'extra-offset = #'(1 . 0) %tweak
+ %\once\override Dynamics.Hairpin #'extra-offset = #'(1 . 0) %tweak
s \> s s
| %6
s8\!
\context {
\PianoStaff
\accepts Dynamics
- \override VerticalAlignment #'forced-distance = #7
}
}
}
\version "2.10.0"
+#(ly:set-option 'clip-systems)
-% each clip-region is a (START . END) pair
-% where both are rhythmic-locations.
+#(set! output-count 1)
-% (make-rhythmic-locations BAR-NUMBER NUM DEN)
-% means NUM/DEN whole-notes into bar numbered BAR-NUMBER
-
-\paper {
+origScore = \score{
+ \relative {
+ \set Staff.instrumentName = #"bla"
+ c1
+ d
+ \grace c16
+ e1
+ \key d\major
+
+ f
+ \break \clef bass
+ g,
+ fis
+ }
+}
- clip-regions
- = #(list
- (cons
- (make-rhythmic-location 2 0 1)
- (make-rhythmic-location 4 0 1))
+\book {
+ \score {
+ \origScore
+ \layout {
- (cons
- (make-rhythmic-location 0 0 1)
- (make-rhythmic-location 4 0 1))
+ %% each clip-region is a (START . END) pair
+ %% where both are rhythmic-locations.
- (cons
- (make-rhythmic-location 0 0 1)
- (make-rhythmic-location 6 0 1))
- )
+ %% (make-rhythmic-locations BAR-NUMBER NUM DEN)
+ %% means NUM/DEN whole-notes into bar numbered BAR-NUMBER
+
+ clip-regions
+ = #(list
+ (cons
+ (make-rhythmic-location 2 0 1)
+ (make-rhythmic-location 4 0 1))
+
+ (cons
+ (make-rhythmic-location 0 0 1)
+ (make-rhythmic-location 4 0 1))
+
+ (cons
+ (make-rhythmic-location 0 0 1)
+ (make-rhythmic-location 6 0 1))
+ )
+ }
+ }
}
-\relative {
- \set Staff.instrumentName = #"bla"
- c1
- d
- \grace c16
- e1
- \key d\major
-
- f
- \break \clef bass
- g,
- fis
-}
+#(set! output-count 0)
+#(ly:set-option 'clip-systems #f)
+
+\book {
+ \score { \origScore }
+ \markup { \bold \fontsize #6 clips }
+ \score {
+ \lyrics {
+ \markup { from-2.0.1-to-4.0.1-clip.eps }
+ \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name parser)) }
+ }
+ }
+}
--- /dev/null
+\header {
+
+ texidoc = "The 2nd half of the cresc. stays at a reasonable distance
+from the notes. "
+
+}
+\version "2.10.13"
+
+\layout {
+ indent = 0.0\mm
+ line-width = 70.0\mm
+}
+
+\relative c' {
+ \setTextCresc
+ c\< c c c | \break
+ c c\! c c
+}
+
}
\relative c'' {
- \override TextSpanner #'edge-text = #'("foo" . "bar")
\override TextSpanner #'bound-padding = #1.0
\override TextSpanner #'dash-fraction = #'()
- \override TextSpanner #'arrow = ##t
+ \override TextSpanner #'bound-details #'right #'arrow = ##t
+ \override TextSpanner #'bound-details #'left #'text = #"fof"
+ \override TextSpanner #'bound-details #'right #'text = #"gag"
+ \override TextSpanner #'bound-details #'right #'padding = #0.6
+
+ \override TextSpanner #'bound-details #'right #'stencil-align-dir-y = #CENTER
+ \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
- \override Glissando #'arrow = ##t
+ \override Glissando #'bound-details #'right #'arrow = ##t
\override Glissando #'arrow-length = #0.5
\override Glissando #'arrow-width = #0.25
--- /dev/null
+\header {
+
+ texidoc = "The period of a dashed line is adjusted such that it
+starts and ends on a full dash. "
+
+}
+
+\version "2.11.13"
+
+\layout {
+ indent = 0.0\mm
+ ragged-right = ##T
+}
+
+\relative <<
+ \new Staff {
+ \override DynamicTextSpanner #'dash-fraction = ##f
+ \setTextCresc
+ c1_\< c c1\!
+ }
+ \new Staff {
+ \override DynamicTextSpanner #'dash-period = #3
+ \override DynamicTextSpanner #'dash-fraction = #0.3
+ \setTextCresc
+ c1^\< c c1\!
+ }
+>>
--- /dev/null
+\header
+{
+
+ texidoc = "test various markup commands."
+
+}
+\paper { ragged-right = ##T }
+\version "2.11.13"
+
+{
+ g'_\markup {
+ \column {
+ \line {
+ foo \magnify #2 foo
+ LOWER \lower #3 LOWER
+ \large \bold { normal \normal-text normal }
+ Small-Caps \smallCaps Small-Caps
+ }
+
+ \override #'(line-width . 50)
+ \override #'(bla . "This is a field containing text. Blah blah
+blah. This is a field containing text. Blah blah blah. This is a
+field containing text. Blah blah blah. This is a field containing
+text. Blah blah blah. This is a field containing text. Blah blah
+blah.")
+ \column {
+ justify:
+ \justify-field #'bla
+ wordwrap:
+ \wordwrap-field #'bla
+ }
+
+ }
+ }
+}
<< \applyMusic #(lambda (x) (music-map notes-to-skip x))
\foobar
- { d2 d2 } >>
+ { d8 d d d d d d d } >>
}
--- /dev/null
+\header {
+ texidoc = "skip-of-length and mmrest-of-length create skips and rests that
+last as long as their arguments."
+
+}
+\paper {
+ ragged-right = ##T
+}
+
+\version "2.11.13"
+
+\relative
+<<
+ \new Staff {
+ c\breve f4 r2.
+ c\breve f4 r2.
+ s\breve^"skip"
+ }
+ \new Staff {
+ \applyMusic #skip-of-length { c\breve } f4 r2.
+ \applyMusic #mmrest-of-length { c\breve } f4 r2.
+ \displayMusic \musicMap #skip->rest s\breve
+ }
+>>
+
\version "2.11.11"
\layout {
- #(layout-set-staff-size 6)
ragged-right = ##t
}
+melody = \relative {
+ \override DynamicText #'extra-offset = #'(0 . 3)
+ s1-\f c''8[(\< r a g]) e[ r d( <f a>])\! \times 2/3 { d4 d d }
+}
+
<<
\new Staff \with {
fontSize = #-4
\override StaffSymbol #'staff-space = #(magstep -4)
+ } {
+ \melody
}
- \relative c' {
- \override DynamicText #'extra-offset = #'(0 . 3)
- s1-\f c''8[(\< r a g]) e[ r d( <f a>])\! \times 2/3 { d4 d d }
- }
- \new Staff
+ \new Staff {
\relative c' {
- \override DynamicText #'extra-offset = #'(0 . 3)
- s1-\f c''8[(\< r a g]) e[ r d( <f a>])\! \times 2/3 { d4 d d }
- }
- >>
-
-
+ \melody
+ }
+ }
+>>
if (!me->is_live ())
return SCM_BOOL_T;
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
SCM accs = me->get_object ("accidental-grobs");
if (!scm_is_pair (accs))
return SCM_BOOL_T;
Align_interface::calc_positioning_done (SCM smob)
{
Grob *me = unsmob_grob (smob);
+
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
SCM axis = scm_car (me->get_property ("axes"));
Axis ax = Axis (scm_to_int (axis));
Real padding = robust_scm2double (me->get_property ("padding"), 0.0);
vector<Real> translates;
+ Skyline down_skyline (stacking_dir);
for (vsize j = 0; j < elems.size (); j++)
{
Real dy = 0;
if (j == 0)
dy = skylines[j][-stacking_dir].max_height ();
else
- dy = skylines[j-1][stacking_dir].distance (skylines[j][-stacking_dir]);
+ {
+ down_skyline.merge (skylines[j-1][stacking_dir]);
+ dy = down_skyline.distance (skylines[j][-stacking_dir]);
+ }
where += stacking_dir * max (0.0, dy + padding + extra_space / elems.size ());
translates.push_back (where);
--- /dev/null
+/*
+ all-font-metrics-scheme.cc -- implement bindings for
+ All_font_metrics.
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2007 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+*/
+
+#include "all-font-metrics.hh"
+#include "main.hh"
+
+LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
+ (),
+ "Forget all about previously loaded fonts. ")
+{
+ delete all_fonts_global;
+ all_fonts_global = new All_font_metrics (global_path.to_string ());
+
+ return SCM_UNSPECIFIED;
+}
+
+
+LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
+ (SCM name),
+ "Load the font @var{name}. ")
+{
+ LY_ASSERT_TYPE(scm_is_string, name, 1);
+
+ Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name));
+
+ return fm->self_scm ();
+}
+
+
}
All_font_metrics *all_fonts_global;
-
-LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
- (),
- "Forget all about previously loaded fonts. ")
-{
- delete all_fonts_global;
- all_fonts_global = new All_font_metrics (global_path.to_string ());
-
- return SCM_UNSPECIFIED;
-}
-
-
-LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
- (SCM name),
- "Load the font @var{name}. ")
-{
- SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
-
- Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name));
-
- return fm->self_scm ();
-}
-
-
Grob_array *ga = unsmob_grob_array (elements);
SCM_ASSERT_TYPE (ga || scm_is_pair (elements), elements, SCM_ARG1, __FUNCTION__, "list or Grob_array");
- SCM_ASSERT_TYPE (unsmob_grob (common), common, SCM_ARG2, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+ LY_ASSERT_SMOB(Grob, common, 2);
+ LY_ASSERT_TYPE(is_axis, axis, 3);
vector<Grob*> elts;
if (!ga)
void
Bar_number_engraver::process_music ()
{
- // todo include (&&!time->cadenza_b_)
-
SCM wb = get_property ("whichBar");
if (scm_is_string (wb))
Real xr = fvs ? lvs->relative_coordinate (common[X_AXIS], X_AXIS) : 0.0;
/*
- We store some info to quickly interpolate.
-
- Sometimes my head is screwed on backwards. The stemlength are
- AFFINE linear in YL and YR. If YL == YR == 0, then we might have
+ We store some info to quickly interpolate. The stemlength are
+ affine linear in YL and YR. If YL == YR == 0, then we might have
stem_y != 0.0, when we're cross staff.
*/
bool f = to_boolean (s->get_property ("french-beaming"))
&& s != lvs && s != fvs;
- base_lengths.push_back (calc_stem_y (me, s, common, xl, xr,
- Interval (0, 0), f) / ss);
+ if (Stem::is_normal_stem (s))
+ {
+ base_lengths.push_back (calc_stem_y (me, s, common, xl, xr,
+ Interval (0, 0), f) / ss);
+ }
+ else
+ {
+ base_lengths.push_back (0);
+ }
+
stem_xposns.push_back (s->relative_coordinate (common[X_AXIS], X_AXIS));
}
-
bool xstaff = false;
if (lvs && fvs)
{
for (vsize i = 0; i < stems.size (); i++)
{
Grob *s = stems[i];
- if (Stem::is_invisible (s))
+ if (!Stem::is_normal_stem (s))
continue;
Real x = stem_xs[i];
rest -> stem -> beam -> interpolate_y_position ()
*/
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Beam, rest_collision_callback, 2, 1);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Beam, rest_collision_callback, 2, 1, "");
SCM
Beam::rest_collision_callback (SCM smob, SCM prev_offset)
{
"containing @code{\\scores}.")
{
Output_def *odef = unsmob_output_def (paper);
- SCM_ASSERT_TYPE (odef, paper,
- SCM_ARG1, __FUNCTION__, "Output_def");
+ LY_ASSERT_SMOB (Output_def, paper, 1);
Book *book = new Book;
book->paper_ = odef;
return x;
}
-LY_DEFINE (ly_parser_print_book, "ly:book-process",
+LY_DEFINE (ly_book_process, "ly:book-process",
4, 0, 0, (SCM book_smob,
SCM default_paper,
SCM default_layout,
{
Book *book = unsmob_book (book_smob);
- SCM_ASSERT_TYPE (book, book_smob, SCM_ARG1, __FUNCTION__, "Book");
- SCM_ASSERT_TYPE (unsmob_output_def (default_paper),
- default_layout, SCM_ARG2, __FUNCTION__, "\\paper block");
- SCM_ASSERT_TYPE (unsmob_output_def (default_layout),
- default_layout, SCM_ARG3, __FUNCTION__, "\\layout block");
+ LY_ASSERT_SMOB(Book, book_smob, 1);
+ LY_ASSERT_SMOB(Output_def, default_paper, 2);
+ LY_ASSERT_SMOB(Output_def, default_layout, 3);
Paper_book *pb = book->process (unsmob_output_def (default_paper),
unsmob_output_def (default_layout));
}
-LY_DEFINE (ly_parser_print_book_to_systems, "ly:book-process-to-systems",
+LY_DEFINE (ly_book_process_to_systems, "ly:book-process-to-systems",
4, 0, 0, (SCM book_smob,
SCM default_paper,
SCM default_layout,
"a string (for file based outputs) or a socket (for network based "
"output).")
{
- Book *book = unsmob_book (book_smob);
+ LY_ASSERT_SMOB (Book, book_smob, 1);
+ LY_ASSERT_SMOB(Output_def, default_paper, 2);
+ LY_ASSERT_SMOB(Output_def, default_layout, 3);
- SCM_ASSERT_TYPE (book, book_smob, SCM_ARG1, __FUNCTION__, "Book");
- SCM_ASSERT_TYPE (unsmob_output_def (default_paper),
- default_layout, SCM_ARG2, __FUNCTION__, "\\paper block");
- SCM_ASSERT_TYPE (unsmob_output_def (default_layout),
- default_layout, SCM_ARG3, __FUNCTION__, "\\layout block");
+ Book *book = unsmob_book (book_smob);
Paper_book *pb = book->process (unsmob_output_def (default_paper),
unsmob_output_def (default_layout));
{
Book *book = (Book *) SCM_CELL_WORD_1 (s);
-#if 0
- if (book->key_)
- scm_gc_mark (book->key_->self_scm ());
-#endif
-
if (book->paper_)
scm_gc_mark (book->paper_->self_scm ());
scm_gc_mark (book->scores_);
Grob *grob = unsmob_grob (smob);
Item *me = dynamic_cast<Item *> (grob);
+
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
vector<Grob*> elems = ordered_elements (me);
vector<Interval> extents;
"return the string @code{one}.")
{
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
+
+ LY_ASSERT_SMOB (Context, context, 1);
return ly_string2scm (tr->id_string ());
}
"i.e. for @code{\\context Voice = one .. } "
"return the symbol @code{Voice}.")
{
+ LY_ASSERT_SMOB (Context, context, 1);
+
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
+
return ly_symbol2scm (tr->context_name ().c_str ());
}
"as an alist")
{
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
- SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+
+ LY_ASSERT_SMOB (Context, context, 1);
+ LY_ASSERT_TYPE(ly_is_symbol, name, 2);
return updated_grob_properties (tr, name);
}
"or reverted (if unspecified).")
{
Context *tg = unsmob_context (context);
- SCM_ASSERT_TYPE (tg, context, SCM_ARG1, __FUNCTION__, "context");
- SCM_ASSERT_TYPE (scm_is_symbol (grob), grob, SCM_ARG2, __FUNCTION__, "symbol");
- SCM_ASSERT_TYPE (scm_is_symbol (eltprop), eltprop, SCM_ARG3, __FUNCTION__, "symbol");
+
+ LY_ASSERT_SMOB (Context, context, 1);
+ LY_ASSERT_TYPE(ly_is_symbol, grob, 2);
+ LY_ASSERT_TYPE(ly_is_symbol, eltprop, 3);
execute_pushpop_property (tg, grob, eltprop, val);
2, 0, 0, (SCM c, SCM name),
"Return the value of @var{name} from context @var{c}")
{
- Context *t = unsmob_context (c);
- Context *tr = (t);
- SCM_ASSERT_TYPE (tr, c, SCM_ARG1, __FUNCTION__, "Translator group");
- SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+ LY_ASSERT_SMOB (Context, c, 1);
+ LY_ASSERT_TYPE(ly_is_symbol, name, 2);
- return tr->internal_get_property (name);
+ Context *t = unsmob_context (c);
+ return t->internal_get_property (name);
}
-LY_DEFINE (ly_context_set_property, "ly:context-set-property!",
+LY_DEFINE (ly_context_set_property_x, "ly:context-set-property!",
3, 0, 0, (SCM context, SCM name, SCM val),
"Set value of property @var{name} in context @var{context} "
"to @var{val}.")
{
+ LY_ASSERT_SMOB (Context, context, 1);
+ LY_ASSERT_TYPE(ly_is_symbol, name, 2);
+
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
- SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
tr->set_property (name, val);
"Return the context above @var{context} "
"where @var{name} is defined.")
{
+ LY_ASSERT_SMOB (Context, context, 1);
+ LY_ASSERT_TYPE(ly_is_symbol,name, 2);
+
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
- SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
SCM val;
tr = tr->where_defined (name, &val);
return SCM_EOL;
}
-LY_DEFINE (ly_unset_context_property, "ly:context-unset-property", 2, 0, 0,
+LY_DEFINE (ly_context_unset_property, "ly:context-unset-property", 2, 0, 0,
(SCM context, SCM name),
"Unset value of property @var{name} in context @var{context}.")
{
+ LY_ASSERT_SMOB (Context, context, 1);
+ LY_ASSERT_TYPE(ly_is_symbol,name, 2);
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
- SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
-
+
tr->unset_property (name);
return SCM_UNSPECIFIED;
}
1, 0, 0, (SCM context),
"Return the parent of @var{context}, @code{#f} if none.")
{
+ LY_ASSERT_SMOB (Context, context, 1);
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
tr = tr->get_parent_context ();
if (tr)
"Find a parent of @var{context} that has name or alias @var{name}. "
"Return @code{#f} if not found.")
{
+ LY_ASSERT_SMOB (Context, context, 1);
+ LY_ASSERT_TYPE(ly_is_symbol,name, 2);
Context *tr = unsmob_context (context);
- SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "context");
- SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
while (tr)
{
1, 0, 0, (SCM context),
"Return now-moment of context CONTEXT")
{
+ LY_ASSERT_SMOB (Context, context, 1);
Context *ctx = unsmob_context (context);
- SCM_ASSERT_TYPE (ctx, context, SCM_ARG1, __FUNCTION__, "Context");
return ctx->now_mom ().smobbed_copy ();
}
1, 0, 0, (SCM context),
"Return event-source of context CONTEXT")
{
+ LY_ASSERT_SMOB (Context, context, 1);
Context *ctx = unsmob_context (context);
- SCM_ASSERT_TYPE (ctx, context, SCM_ARG1, __FUNCTION__, "Context");
return ctx->event_source ()->self_scm ();
}
"Return a stream-distributor that distributes all events\n"
" from @var{context} and all its subcontexts.")
{
+ LY_ASSERT_SMOB (Context, context, 1);
Context *ctx = unsmob_context (context);
- SCM_ASSERT_TYPE (ctx, context, SCM_ARG1, __FUNCTION__, "Context");
return ctx->events_below ()->self_scm ();
}
1, 0, 0, (SCM num),
"@var{num} printer points")
{
- SCM_ASSERT_TYPE (scm_is_number (num), num, SCM_ARG1, __FUNCTION__,
- "number");
+ LY_ASSERT_TYPE (scm_is_number, num, 1);
return scm_from_double (point_constant
* scm_to_double (num));
}
1, 0, 0, (SCM num),
"@var{num} cm")
{
- SCM_ASSERT_TYPE (scm_is_number (num), num, SCM_ARG1, __FUNCTION__,
- "number");
+ LY_ASSERT_TYPE (scm_is_number, num, 1);
return scm_from_double (cm_constant
* scm_to_double (num));
}
1, 0, 0, (SCM num),
"@var{num} inches")
{
- SCM_ASSERT_TYPE (scm_is_number (num), num, SCM_ARG1, __FUNCTION__,
- "number");
+ LY_ASSERT_TYPE (scm_is_number, num, 1);
return scm_from_double (inch_constant
* scm_to_double (num));
}
1, 0, 0, (SCM num),
"@var{num} mm")
{
- SCM_ASSERT_TYPE (scm_is_number (num), num, SCM_ARG1, __FUNCTION__,
- "number");
+ LY_ASSERT_TYPE (scm_is_number, num, 1);
return scm_from_double (mm_constant
* scm_to_double (num));
}
1, 0, 0, (SCM num),
"@var{num} bigpoints (1/72th inch)")
{
- SCM_ASSERT_TYPE (scm_is_number (num), num, SCM_ARG1, __FUNCTION__,
- "number");
+ LY_ASSERT_TYPE (scm_is_number, num, 1);
return scm_from_double (bigpoint_constant
* scm_to_double (num));
}
return (new Dispatcher ())->unprotect ();
}
-LY_DEFINE (ly_register_dispatcher, "ly:connect-dispatchers",
+LY_DEFINE (ly_connect_dispatchers, "ly:connect-dispatchers",
2, 0, 0, (SCM to, SCM from),
"Makes the dispatcher @var{to} listen to events from @var{from}." )
{
Dispatcher *t = unsmob_dispatcher (to);
Dispatcher *f = unsmob_dispatcher (from);
- SCM_ASSERT_TYPE (t, from, SCM_ARG1, __FUNCTION__, "dispatcher");
- SCM_ASSERT_TYPE (f, to, SCM_ARG2, __FUNCTION__, "dispatcher");
+
+ LY_ASSERT_SMOB (Dispatcher, to, 1);
+ LY_ASSERT_SMOB(Dispatcher, from, 2);
+
t->register_as_listener (f);
return SCM_UNDEFINED;
{
Listener *l = unsmob_listener (list);
Dispatcher *d = unsmob_dispatcher (disp);
- SCM_ASSERT_TYPE (l, list, SCM_ARG1, __FUNCTION__, "listener");
- SCM_ASSERT_TYPE (d, disp, SCM_ARG2, __FUNCTION__, "dispatcher");
+
+ LY_ASSERT_SMOB (Listener, list, 1);
+ LY_ASSERT_SMOB(Dispatcher, disp, 2);
for (int arg = SCM_ARG3; scm_is_pair (cl); cl = scm_cdr (cl), arg++)
{
{
Dispatcher *d = unsmob_dispatcher (disp);
Stream_event *e = unsmob_stream_event (ev);
- SCM_ASSERT_TYPE (d, disp, SCM_ARG1, __FUNCTION__, "dispatcher");
- SCM_ASSERT_TYPE (e, ev, SCM_ARG2, __FUNCTION__, "stream event");
+
+ LY_ASSERT_SMOB (Dispatcher, disp, 1);
+
+ LY_ASSERT_SMOB(Stream_event, ev, 2);
d->broadcast (e);
return SCM_UNDEFINED;
}
Dot_column::calc_positioning_done (SCM smob)
{
Grob *me = unsmob_grob (smob);
+
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
vector<Grob*> dots
= extract_grob_array (me, "dots");
2, 0, 0, (SCM p1, SCM p2),
"Is @var{p1} shorter than @var{p2}?")
{
+ LY_ASSERT_SMOB(Duration, p1, 1);
+ LY_ASSERT_SMOB(Duration, p2, 2);
+
Duration *a = unsmob_duration (p1);
Duration *b = unsmob_duration (p2);
- SCM_ASSERT_TYPE (a, p1, SCM_ARG1, __FUNCTION__, "Duration");
- SCM_ASSERT_TYPE (b, p2, SCM_ARG2, __FUNCTION__, "Duration");
-
if (Duration::compare (*a, *b) < 0)
return SCM_BOOL_T;
else
"(whole, half, quarter, etc.) and a number of augmentation\n"
"dots. \n")
{
- SCM_ASSERT_TYPE (scm_is_integer (length),
- length, SCM_ARG1, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_integer, length, 1);
int dots = 0;
if (dotcount != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_integer (dotcount),
- dotcount, SCM_ARG2, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_integer, dotcount,2);
dots = scm_to_int (dotcount);
}
bool compress = false;
if (num != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_number (num), num, SCM_ARG3, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_number,num, 3);
compress = true;
}
else
if (den != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_number (den), den, SCM_ARG4, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_number,den, 4);
compress = true;
}
else
1, 0, 0, (SCM dur),
"Extract the duration log from @var{dur}")
{
- SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
+ LY_ASSERT_SMOB (Duration, dur, 1);
return scm_from_int (unsmob_duration (dur)->duration_log ());
}
1, 0, 0, (SCM dur),
"Extract the dot count from @var{dur}")
{
- SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
+ LY_ASSERT_SMOB (Duration, dur, 1);
return scm_from_int (unsmob_duration (dur)->dot_count ());
}
1, 0, 0, (SCM d),
"The 2-logarithm of 1/@var{d}.")
{
- SCM_ASSERT_TYPE (scm_is_number (d), d, SCM_ARG1, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_number, d, 1);
int log = intlog2 (scm_to_int (d));
return scm_from_int (log);
}
1, 0, 0, (SCM dur),
"The length of the duration as a Moment.")
{
- SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
+ LY_ASSERT_SMOB (Duration, dur, 1);
return Moment (unsmob_duration (dur)->get_length ()).smobbed_copy ();
}
-LY_DEFINE (ly_duration2string, "ly:duration->string",
+LY_DEFINE (ly_duration_2_string, "ly:duration->string",
1, 0, 0, (SCM dur),
"Convert @var{dur} to string.")
{
- SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
+ LY_ASSERT_SMOB (Duration, dur, 1);
return ly_string2scm (unsmob_duration (dur)->to_string ());
}
1, 0, 0, (SCM dur),
"Extract the compression factor from @var{dur}. Return as a pair.")
{
- SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
+ LY_ASSERT_SMOB (Duration, dur, 1);
Rational r = unsmob_duration (dur)->factor ();
return scm_cons (scm_from_int (r.num ()), scm_from_int (r.den ()));
}
"the grob to be created and the corresponding line number in the "
"C++ source file.")
{
- SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__,
- "procedure");
+ LY_ASSERT_TYPE (ly_is_procedure, cb, 1);
creation_callback = cb;
(SCM name),
"Get the file for font @var{name}")
{
- SCM_ASSERT_TYPE (scm_is_string (name), name,
- SCM_ARG1, __FUNCTION__, "string");
-
+ LY_ASSERT_TYPE (scm_is_string, name, 1);
FcPattern*pat = FcPatternCreate ();
FcValue val;
"is not available, return @code{#f}.")
{
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG2, __FUNCTION__, "string");
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE(scm_is_string,name, 2);
Stencil m = fm->find_by_name (ly_scm2string (name));
"in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- SCM_ASSERT_TYPE (scm_is_number (index), index, SCM_ARG2, __FUNCTION__, "number");
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE(scm_is_number, index,2);
return fm->get_ascii_char_stencil (scm_to_int (index)).smobbed_copy ();
}
"Return the index for @var{name} in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG2, __FUNCTION__, "string");
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE(scm_is_string,name, 2);
return scm_from_int (fm->name_to_index (ly_scm2string (name)));
}
"Return the character code for @var{index} @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- SCM_ASSERT_TYPE (scm_is_integer (index), index, SCM_ARG2, __FUNCTION__, "index");
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE(scm_is_integer,index, 2);
return scm_from_unsigned_integer (fm->index_to_charcode (scm_to_int (index)));
}
"Return the character code for glyph @var{name} in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG2, __FUNCTION__, "string");
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE(scm_is_string,name, 2);
return scm_from_unsigned_integer (fm->index_to_charcode (fm->name_to_index (ly_scm2string (name))));
}
Modified_font_metric *fm = dynamic_cast<Modified_font_metric *>
(unsmob_metrics (font));
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "modified font metric");
- SCM_ASSERT_TYPE (scm_is_string (text), text, SCM_ARG2, __FUNCTION__, "string");
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE(scm_is_string,text, 2);
Stencil stc (fm->text_stencil (ly_scm2string (text)));
return scm_cons (ly_interval2scm (stc.extent (X_AXIS)),
ly_interval2scm (stc.extent (Y_AXIS)));
"Given the font metric @var{font}, "
"return the corresponding file name.")
{
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
SCM name = fm->font_file_name ();
return name;
"Given the font metric @var{font}, "
"return the corresponding name.")
{
+ LY_ASSERT_SMOB (Font_metric, font, 1);
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
return ly_string2scm (fm->font_name ());
}
LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
(SCM font),
"Given the font metric @var{font}, return the "
- "magnification, relative to the current outputs-cale.")
+ "magnification, relative to the current output-scale.")
{
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
return scm_cdr (fm->description_);
}
"Given the font metric @var{font}, return the "
"design size, relative to the current output-scale.")
{
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
return scm_from_double (fm->design_size ());
}
#include "std-string.hh"
#include "lily-guile.hh"
+#include "warn.hh"
+
+/* type predicates. */
+#include "spanner.hh"
+#include "item.hh"
+
static SCM doc_hash_table;
-void ly_add_function_documentation (SCM func,
- char const *fname,
- char const *varlist,
- char const *doc)
+void
+ly_check_name (string cxx, string scm_name)
+{
+ string mangle = mangle_cxx_identifier (cxx);
+ if (mangle != scm_name)
+ {
+ programming_error ("wrong cxx name: " + mangle + ", " + cxx + ", " + scm_name);
+ }
+}
+
+
+void
+ly_add_function_documentation (SCM func,
+ string fname,
+ string varlist,
+ string doc)
{
- if (!strlen (doc))
+ if (doc == "")
return;
if (!doc_hash_table)
scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"),
ly_string2scm (s));
- SCM entry = scm_cons (scm_from_locale_string (varlist), scm_from_locale_string (doc));
- scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
+ SCM entry = scm_cons (ly_string2scm (varlist), ly_string2scm (doc));
+ scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname.c_str()), entry);
}
LY_DEFINE (ly_get_all_function_documentation, "ly:get-all-function-documentation",
{
return doc_hash_table;
}
+
+
+#include <map>
+
+map<void *, string> type_names;
+
+void
+ly_add_type_predicate (void *ptr,
+ string name)
+{
+ type_names[ptr] = name;
+}
+
+string
+predicate_to_typename (void *ptr)
+{
+ if (type_names.find (ptr) == type_names.end ())
+ return "unknown type";
+ else
+ return type_names[ptr];
+}
+
+static int
+arg_dir (int a, int b)
+{
+ if (&a < &b)
+ return 1;
+ else
+ return -1;
+}
+
+
+int function_argument_direction;
+void
+init_func_doc ()
+{
+ function_argument_direction = arg_dir (2,3);
+
+ ly_add_type_predicate ((void*) &scm_is_integer, "integer");
+ ly_add_type_predicate ((void*) &scm_is_bool, "boolean");
+ ly_add_type_predicate ((void*) &scm_is_pair, "pair");
+ ly_add_type_predicate ((void*) &is_number_pair, "number pair");
+ ly_add_type_predicate ((void*) &scm_is_number, "number");
+ ly_add_type_predicate ((void*) &scm_is_string, "string");
+ ly_add_type_predicate ((void*) &ly_is_symbol, "symbol");
+ ly_add_type_predicate ((void*) &scm_is_vector, "vector");
+ ly_add_type_predicate ((void*) &is_axis, "axis");
+ ly_add_type_predicate ((void*) &unsmob_spanner, "spanner");
+ ly_add_type_predicate ((void*) &unsmob_item, "item");
+}
+
+ADD_SCM_INIT_FUNC(func_doc, init_func_doc);
"Return the absolute file name of @var{name}, "
"or @code{#f} if not found.")
{
- SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, name, 1);
string nm = ly_scm2string (name);
string file_name = global_path.find (nm);
"Read the file @var{name}, and return its contents in a string. "
"The file is looked up using the search path. ")
{
- SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, name, 1);
int sz = INT_MAX;
if (size != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_number (size), size, SCM_ARG2, __FUNCTION__, "number");
+ LY_ASSERT_TYPE(scm_is_number,size, 2);
sz = scm_to_int (size);
}
"Scheme callable function to issue the error @code{msg}. "
"The error is formatted with @code{format} and @code{rest}.")
{
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
str = scm_simple_format (SCM_BOOL_F, str, rest);
error (ly_scm2string (str));
return SCM_UNSPECIFIED;
"Scheme callable function to issue the message @code{msg}. "
"The message is formatted with @code{format} and @code{rest}.")
{
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
str = scm_simple_format (SCM_BOOL_F, str, rest);
message (ly_scm2string (str));
return SCM_UNSPECIFIED;
"Scheme callable function to print progress @code{str}. "
"The message is formatted with @code{format} and @code{rest}.")
{
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
str = scm_simple_format (SCM_BOOL_F, str, rest);
progress_indication (ly_scm2string (str));
return SCM_UNSPECIFIED;
"Scheme callable function to issue the warning @code{msg}. "
"The message is formatted with @code{format} and @code{rest}.")
{
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
str = scm_simple_format (SCM_BOOL_F, str, rest);
programming_error (ly_scm2string (str));
return SCM_UNSPECIFIED;
"Scheme callable function to issue the warning @code{str}. "
"The message is formatted with @code{format} and @code{rest}.")
{
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
str = scm_simple_format (SCM_BOOL_F, str, rest);
warning (ly_scm2string (str));
return SCM_UNSPECIFIED;
3, 0, 0, (SCM a, SCM b, SCM s),
"Replace @var{a} by @var{b} in @var{s}.")
{
- SCM_ASSERT_TYPE (scm_is_string (a), s, SCM_ARG1, __FUNCTION__, "string");
- SCM_ASSERT_TYPE (scm_is_string (b), s, SCM_ARG2, __FUNCTION__, "string");
- SCM_ASSERT_TYPE (scm_is_string (s), s, SCM_ARG3, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, s, 1);
+ LY_ASSERT_TYPE(scm_is_string,b, 2);
+ LY_ASSERT_TYPE(scm_is_string,s, 3);
string ss = ly_scm2string (s);
replace_all (ss, string (scm_i_string_chars (a)),
return ly_string2scm (ss);
}
-LY_DEFINE (ly_number2string, "ly:number->string",
+LY_DEFINE (ly_number_2_string, "ly:number->string",
1, 0, 0, (SCM s),
"Convert @var{num} to a string without generating many decimals.")
{
- SCM_ASSERT_TYPE (scm_is_number (s), s, SCM_ARG1, __FUNCTION__, "number");
+ LY_ASSERT_TYPE (scm_is_number, s, 1);
char str[400]; // ugh.
1, 0, 0, (SCM string),
"Gettext wrapper.")
{
- SCM_ASSERT_TYPE (scm_is_string (string), string, SCM_ARG1,
- __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, string, 1);
return ly_string2scm (_ (scm_i_string_chars (string)));
}
return lst;
}
-LY_DEFINE (ly_wchar_to_utf_8, "ly:wide-char->utf-8",
+LY_DEFINE (ly_wide_char_2_utf_8, "ly:wide-char->utf-8",
1, 0, 0, (SCM wc),
"Encode the Unicode codepoint @var{wc}, an integer, as UTF-8")
{
char buf[5];
- SCM_ASSERT_TYPE (scm_is_integer (wc), wc, SCM_ARG1, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_integer, wc, 1);
unsigned wide_char = (unsigned) scm_to_int (wc);
char *p = buf;
1, 1, 0, (SCM file_name, SCM mode),
"Redirect stderr to FILE-NAME, opened with MODE.")
{
- SCM_ASSERT_TYPE (scm_is_string (file_name), file_name, SCM_ARG1,
- __FUNCTION__, "file_name");
+ LY_ASSERT_TYPE (scm_is_string, file_name, 1);
string m = "w";
if (mode != SCM_UNDEFINED && scm_string_p (mode))
NULL, SCM_EOL, tab);
}
-LY_DEFINE (ly_camel_case_to_lisp_identifier, "ly:camel-case->lisp-identifier",
+LY_DEFINE (ly_camel_case_2_lisp_identifier, "ly:camel-case->lisp-identifier",
1, 0, 0, (SCM name_sym),
"Convert FooBar_Bla to foo-bar-bla style symbol.")
{
- SCM_ASSERT_TYPE(scm_is_symbol (name_sym), name_sym,
- SCM_ARG1, __FUNCTION__, "symbol");
+ LY_ASSERT_TYPE (ly_is_symbol, name_sym, 1);
/*
TODO: should use strings instead?
1, 0, 0, (SCM str),
"Expand $VAR and $@{VAR@} in @var{str}.")
{
- SCM_ASSERT_TYPE(scm_is_string (str), str,
- SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
return ly_string2scm (expand_environment_variables (ly_scm2string (str)));
}
2, 0, 0, (SCM lst, SCM i),
"Take at most the first @var{i} of list @var{lst}")
{
- SCM_ASSERT_TYPE(scm_is_integer (i), i,
- SCM_ARG1, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_integer, i, 1);
int k = scm_to_int (i);
if (k == 0)
1, 0, 1, (SCM str, SCM rest),
"LilyPond specific format, supporting ~a ~[0-9]f.")
{
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
string format = ly_scm2string (str);
vector<string> results;
(c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+
#include "cpu-timer.hh"
#include "global-context.hh"
#include "international.hh"
"process it and return the @code{Music_output} object in its final state.")
{
Global_context *g = dynamic_cast<Global_context *> (unsmob_context (context));
- SCM_ASSERT_TYPE (g, context, SCM_ARG1, __FUNCTION__, "Global context");
+
+ LY_ASSERT_TYPE (unsmob_global_context, context, 1)
SCM output = g->get_output ();
progress_indication ("\n");
"@var{global}. The translator group is returned.")
{
Global_context *g = dynamic_cast<Global_context *> (unsmob_context (global));
- SCM_ASSERT_TYPE (g, global, SCM_ARG1, __FUNCTION__, "Global context");
+ LY_ASSERT_TYPE (unsmob_global_context, global, 1)
Translator_group *tg = new Translator_group ();
tg->connect_to_context (g);
"The context is returned.\n"
)
{
- Output_def *odef = unsmob_output_def (output_def);
-
- SCM_ASSERT_TYPE (odef, output_def, SCM_ARG1, __FUNCTION__,
- "Output definition");
+ LY_ASSERT_SMOB (Output_def, output_def, 1);
+ Output_def *odef = unsmob_output_def (output_def);
Global_context *glob = new Global_context (odef);
"global context @var{ctx}. The context is returned in its\n"
"final state.\n")
{
- Music *music = unsmob_music (mus);
- Global_context *g = dynamic_cast<Global_context *> (unsmob_context (ctx));
- SCM_ASSERT_TYPE (music, mus, SCM_ARG1, __FUNCTION__, "Music");
- SCM_ASSERT_TYPE (g, ctx, SCM_ARG2, __FUNCTION__, "Global context");
+ LY_ASSERT_SMOB (Music, mus, 1);
+ LY_ASSERT_TYPE (unsmob_global_context,ctx, 2);
+ Music *music = unsmob_music (mus);
if (!music
|| !music->get_length ().to_bool ())
{
return SCM_BOOL_F;
}
+ Global_context *g = dynamic_cast<Global_context *> (unsmob_context (ctx));
+
Cpu_timer timer;
message (_ ("Interpreting music... "));
"Optionally, this routine takes an Object-key to\n"
"to uniquely identify the Score block containing it.\n")
{
+ LY_ASSERT_SMOB (Music, mus, 1);
+ LY_ASSERT_SMOB (Output_def, output_def, 2);
+
SCM glob = ly_make_global_context (output_def);
ly_make_global_translator (glob);
ly_interpret_music_expression (mus, glob);
else
return Context::get_default_interpreter ();
}
+
+Global_context *
+unsmob_global_context (SCM x)
+{
+ return dynamic_cast<Global_context *> (unsmob_context (x));
+}
(SCM grob_arr),
"Return the grob_array length.")
{
+ LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
+
Grob_array *me = unsmob_grob_array (grob_arr);
- SCM_ASSERT_TYPE (me, grob_arr, SCM_ARG1, __FUNCTION__, "Grob_array");
return scm_from_int (me->size ());
}
"Retrieve the @code{index} element of @code{grob-arr}.")
{
Grob_array *me = unsmob_grob_array (grob_arr);
- SCM_ASSERT_TYPE (me, grob_arr, SCM_ARG1, __FUNCTION__, "Grob_array");
- SCM_ASSERT_TYPE (scm_is_integer (index), index, SCM_ARG2, __FUNCTION__, "integer");
+ LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
+ LY_ASSERT_TYPE(scm_is_integer,index, 2);
vsize i = scm_to_unsigned (index);
if (i == VPOS || i >= me->size ())
3, 0, 0, (SCM a, SCM b, SCM c),
"Add an interface description.")
{
- SCM_ASSERT_TYPE (scm_is_symbol (a), a, SCM_ARG1, __FUNCTION__, "symbol");
- SCM_ASSERT_TYPE (scm_is_string (b), b, SCM_ARG2, __FUNCTION__, "string");
- SCM_ASSERT_TYPE (ly_is_list (c), c, SCM_ARG3, __FUNCTION__, "list of syms");
+ LY_ASSERT_TYPE (ly_is_symbol, a, 1);
+ LY_ASSERT_TYPE(scm_is_string,b, 2);
+ LY_ASSERT_TYPE(ly_is_list,c, 3);
if (!all_ifaces)
{
SCM tab = scm_c_make_hash_table (59);
context ()->set_property ("busyGrobs", SCM_EOL);
}
-LY_DEFINE (ly_grob_pq_less_p, "ly:grob-pq-less?",
+LY_DEFINE (ly_grob_pq_less_p, "ly:grob-pq<?",
2, 0, 0, (SCM a, SCM b),
"Compare 2 grob priority queue entries. Internal")
{
"which the modification was requested, the property to be changed and "
"the new value for the property.")
{
-
- SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__,
- "procedure");
+ LY_ASSERT_TYPE (ly_is_procedure, cb, 1);
modification_callback = cb;
return SCM_UNSPECIFIED;
Grob::internal_get_property (SCM sym) const
{
SCM val = get_property_data (sym);
+
+#ifndef NDEBUG
+ if (val == ly_symbol2scm ("calculation-in-progress"))
+ programming_error (_f ("cyclic dependency: calculation-in-progress encountered for #'%s (%s)",
+ ly_symbol2string (sym).c_str (),
+ name().c_str ()));
+#endif
+
if (ly_is_procedure (val)
|| is_simple_closure (val))
{
*/
if (value == SCM_UNSPECIFIED)
{
- value = internal_get_property (sym);
+ value = get_property_data (sym);
assert (value == SCM_EOL || value == marker);
if (value == marker)
*alist = scm_assq_remove_x (*alist, marker);
"Retrieve @var{sym} for @var{grob} but don't process callbacks.")
{
Grob *sc = unsmob_grob (grob);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_TYPE (ly_is_symbol,sym, 2);
return sc->get_property_data (sym);
}
"Set @var{sym} in grob @var{grob} to value @var{val}")
{
Grob *sc = unsmob_grob (grob);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_TYPE (ly_is_symbol,sym, 2);
if (!ly_is_procedure (val)
&& !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
"\n\n")
{
Grob *sc = unsmob_grob (grob);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_TYPE (ly_is_symbol,sym, 2);
if (deflt == SCM_UNDEFINED)
deflt = SCM_EOL;
"Return the interfaces list of grob @var{grob}.")
{
Grob *sc = unsmob_grob (grob);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
return sc->interfaces ();
}
"\n\n")
{
Grob *sc = unsmob_grob (grob);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_TYPE (ly_is_symbol,sym, 2);
return sc->internal_get_object (sym);
}
/* TODO: make difference between scaled and unscalead variable in
calling (i.e different funcs.) */
LY_DEFINE (ly_grob_layout, "ly:grob-layout",
- 1, 0, 0, (SCM g),
- "Get @code{\\layout} definition from grob @var{g}.")
+ 1, 0, 0, (SCM grob),
+ "Get @code{\\layout} definition from grob @var{grob}.")
{
- Grob *sc = unsmob_grob (g);
- SCM_ASSERT_TYPE (sc, g, SCM_ARG1, __FUNCTION__, "grob");
+ Grob *sc = unsmob_grob (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
return sc->layout ()->self_scm ();
}
"from the layout block is taken. ")
{
Grob *sc = unsmob_grob (grob);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
if (global == SCM_UNDEFINED)
{
return sc->get_property_alist_chain (global);
}
-LY_DEFINE (ly_get_extent, "ly:grob-extent",
+LY_DEFINE (ly_grob_extent, "ly:grob-extent",
3, 0, 0, (SCM grob, SCM refp, SCM axis),
"Get the extent in @var{axis} direction of @var{grob} relative to "
"the grob @var{refp}")
Grob *sc = unsmob_grob (grob);
Grob *ref = unsmob_grob (refp);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (ref, refp, SCM_ARG2, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_SMOB(Grob, refp, 2);
+ LY_ASSERT_TYPE(is_axis,axis, 3);
Axis a = Axis (scm_to_int (axis));
Grob *sc = unsmob_grob (grob);
Grob *ref = unsmob_grob (refp);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (ref, refp, SCM_ARG2, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_SMOB(Grob, refp, 2);
+ LY_ASSERT_TYPE(is_axis,axis, 3);
Axis a = Axis (scm_to_int (axis));
Grob *sc = unsmob_grob (grob);
Grob *ref = unsmob_grob (refp);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (ref, refp, SCM_ARG2, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_SMOB(Grob,refp, 2);
+ LY_ASSERT_TYPE(is_axis,axis, 3);
Axis a = Axis (scm_to_int (axis));
"1 for the Y-axis.")
{
Grob *sc = unsmob_grob (grob);
- SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_TYPE(is_axis,axis, 2);
Grob *par = sc->get_parent (Axis (scm_to_int (axis)));
return par ? par->self_scm () : SCM_EOL;
"Get the mutable proprerties of @var{grob}.")
{
Grob *g = unsmob_grob (grob);
- SCM_ASSERT_TYPE (g, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
/* FIXME: uhg? copy/read only? */
return g->mutable_property_alist_;
"Get the immutable properties of @var{grob}.")
{
Grob *g = unsmob_grob (grob);
- SCM_ASSERT_TYPE (g, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
/* FIXME: uhg? copy/read only? */
return g->immutable_property_alist_;
}
LY_DEFINE (ly_grob_system, "ly:grob-system",
- 1, 0, 0, (SCM g),
- "Return the System Grob of @var{g}.")
+ 1, 0, 0, (SCM grob),
+ "Return the System Grob of @var{grob}.")
{
- Grob *me = unsmob_grob (g);
- SCM_ASSERT_TYPE (me, g, SCM_ARG1, __FUNCTION__, "grob");
+ Grob *me = unsmob_grob (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
if (System *g = me->get_system ())
return g->self_scm ();
"Return the unbroken original Grob of @var{grob}.")
{
Grob *me = unsmob_grob (grob);
- SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
return me->original () ? me->original ()->self_scm () : me->self_scm ();
}
LY_DEFINE (ly_grob_suicide_x, "ly:grob-suicide!",
- 1, 0, 0, (SCM g),
- "Kill @var{g}.")
+ 1, 0, 0, (SCM grob),
+ "Kill @var{grob}.")
{
- Grob *me = unsmob_grob (g);
- SCM_ASSERT_TYPE (me, g, SCM_ARG1, __FUNCTION__, "grob");
+ Grob *me = unsmob_grob (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
me->suicide ();
return SCM_UNSPECIFIED;
}
LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
- 3, 0, 0, (SCM g, SCM d, SCM a),
+ 3, 0, 0, (SCM grob, SCM d, SCM a),
"Translate @var{g} on axis @var{a} over distance @var{d}.")
{
- Grob *me = unsmob_grob (g);
- SCM_ASSERT_TYPE (me, g, SCM_ARG1, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (scm_is_number (d), d, SCM_ARG2, __FUNCTION__, "dimension");
- SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG3, __FUNCTION__, "axis");
+ Grob *me = unsmob_grob (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_TYPE(scm_is_number,d, 2);
+ LY_ASSERT_TYPE(is_axis,a, 3);
me->translate_axis (scm_to_double (d), Axis (scm_to_int (a)));
return SCM_UNSPECIFIED;
"Return the default font for grob @var{gr}.")
{
Grob *gr = unsmob_grob (grob);
- SCM_ASSERT_TYPE (gr, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
return Font_interface::get_default_font (gr)->self_scm ();
}
{
Grob *gr = unsmob_grob (grob);
- SCM_ASSERT_TYPE (gr, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_SMOB(Grob,other, 2);
Grob *o = unsmob_grob (other);
- SCM_ASSERT_TYPE (o, other, SCM_ARG2, __FUNCTION__, "grob");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+ LY_ASSERT_TYPE(is_axis,axis, 3);
Grob *refp = gr->common_refpoint (o, Axis (scm_to_int (axis)));
return refp ? refp->self_scm () : SCM_BOOL_F;
)
{
Grob *gr = unsmob_grob (grob);
- SCM_ASSERT_TYPE (gr, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_SMOB(Grob_array,others, 2);
Grob_array *ga = unsmob_grob_array (others);
- SCM_ASSERT_TYPE (ga, others, SCM_ARG2, __FUNCTION__, "grob array");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+ LY_ASSERT_TYPE(is_axis,axis, 3);
Grob *refp = common_refpoint_of_array (ga->array (), gr, Axis (scm_to_int (axis)));
return refp ? refp->self_scm () : SCM_BOOL_F;
(a == X_AXIS)
? ly_symbol2scm ("X-extent")
: ly_symbol2scm ("Y-extent");
-
+
SCM ext = internal_get_property (ext_sym);
if (is_number_pair (ext))
real_ext.unite (ly_scm2interval (ext));
return Axis_group_interface::generic_group_extent (me, Y_AXIS);
}
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, calc_skylines, 1);
+SCM
+Hara_kiri_group_spanner::calc_skylines (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ consider_suicide (me);
+ return Axis_group_interface::calc_skylines (smob);
+}
+
MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, pure_height, 3);
SCM
Hara_kiri_group_spanner::pure_height (SCM smob, SCM start_scm, SCM end_scm)
Box lookup_tex_text_dimension (Font_metric *font, SCM text);
+char *pfb2pfa (Byte const *pfb, int length);
+
#endif /* FONT_METRIC_HH */
};
SCM ly_format_output (SCM);
+Global_context *unsmob_global_context (SCM x);
#endif // GLOBAL_CONTEXT_HH
public:
DECLARE_SCHEME_CALLBACK (force_hara_kiri_callback, (SCM));
DECLARE_SCHEME_CALLBACK (y_extent, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (calc_skylines, (SCM smob));
DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end));
DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_y_parent_callback, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
/*
- lily-guile-macros.hh -- declare
+ lily-guile-macros.hh -- declare GUILE interaction macros.
source file of the GNU LilyPond music typesetter
FIXME: should add check for x86 as well? */
#define CACHE_SYMBOLS
-
-
-
#ifdef CACHE_SYMBOLS
/* this lets us "overload" macros such as get_property to take
#define DECLARE_SCHEME_CALLBACK(NAME, ARGS) \
static SCM NAME ARGS; \
static SCM NAME ## _proc
-
+#define ADD_TYPE_PREDICATE(func, type_name) \
+ void \
+ func ## _type_adder () \
+ {\
+ ly_add_type_predicate ((Type_predicate_ptr)func, type_name); \
+ }\
+ ADD_SCM_INIT_FUNC(func ## _type_adder_ctor, \
+ func ## _type_adder);
+#define ADD_TYPE_PREDICATE(func, type_name) \
+ void \
+ func ## _type_adder () \
+ {\
+ ly_add_type_predicate ((Type_predicate_ptr)func, type_name); \
+ }\
+ ADD_SCM_INIT_FUNC(func ## _type_adder_ctor, \
+ func ## _type_adder);
+
+string mangle_cxx_identifier (string);
+
+void ly_add_type_predicate (void *ptr, string name);
+string predicate_to_typename (void *ptr);
+
/*
Make TYPE::FUNC available as a Scheme function.
*/
-string mangle_cxx_identifier (string);
-#define MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, OPTIONAL_COUNT) \
+#define MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, OPTIONAL_COUNT, DOC) \
SCM TYPE ::FUNC ## _proc; \
void \
TYPE ## _ ## FUNC ## _init_functions () \
{ \
- string id = mangle_cxx_identifier (string (#TYPE) + "::" + string (#FUNC)); \
+ string cxx = string (#TYPE) + "::" + string (#FUNC); \
+ string id = mangle_cxx_identifier (cxx); \
TYPE ::FUNC ## _proc = scm_c_define_gsubr (id.c_str(), \
(ARGCOUNT-OPTIONAL_COUNT), OPTIONAL_COUNT, 0, \
(Scheme_function_unknown) TYPE::FUNC); \
+ ly_add_function_documentation (TYPE :: FUNC ## _proc, id.c_str(), "", \
+ DOC); \
scm_c_export (id.c_str (), NULL); \
} \
\
ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback, \
TYPE ## _ ## FUNC ## _init_functions);
+#define MAKE_DOCUMENTED_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT, DOC) \
+ MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, 0, DOC);
+
#define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT) \
- MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE,FUNC,ARGCOUNT,0);
+ MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE,FUNC,ARGCOUNT, 0, "");
-void
-ly_add_function_documentation (SCM proc, char const *fname,
- char const *varlist,
- char const *doc);
+void ly_add_function_documentation (SCM proc, string fname, string varlist, string doc);
+void ly_check_name (string cxx, string fname);
#define ADD_SCM_INIT_FUNC(name, func) \
class name ## _scm_initter \
{ \
FNAME ## _proc = scm_c_define_gsubr (PRIMNAME, REQ, OPT, VAR, \
(Scheme_function_unknown) FNAME); \
+ ly_check_name (#FNAME, PRIMNAME);\
ly_add_function_documentation (FNAME ## _proc, PRIMNAME, #ARGLIST, \
DOCSTRING); \
scm_c_export (PRIMNAME, NULL); \
#define set_property(x, y) internal_set_property (ly_symbol2scm (x), y)
#endif
+
+
+#define LY_ASSERT_TYPE(pred, var, number) \
+ { \
+ if (!pred (var)) \
+ { \
+ scm_wrong_type_arg_msg(mangle_cxx_identifier (__FUNCTION__).c_str(), \
+ number, var, \
+ predicate_to_typename ((void*) &pred).c_str()); \
+ } \
+ }
+
+#define LY_ASSERT_SMOB(klass, var, number) LY_ASSERT_TYPE(klass::unsmob, var, number)
+
+
+
#endif /* LILY_GUILE_MACROS_HH */
inline bool ly_is_procedure (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
inline bool ly_is_port (SCM x) { return SCM_NFALSEP (scm_port_p (x)); }
+/*
+ want to take the address of this function; scm_is_symbol() is a
+ macro.
+ */
+inline bool ly_is_symbol (SCM x) { return scm_is_symbol (x); }
+
inline bool ly_is_equal (SCM x, SCM y)
{
return SCM_NFALSEP (scm_equal_p (x, y));
+++ /dev/null
-/*
- line-spanner.hh -- declare Line_spanner
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000--2007 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef LINE_SPANNER_HH
-#define LINE_SPANNER_HH
-
-#include "lily-proto.hh"
-#include "grob-interface.hh"
-
-class Line_spanner
-{
-public:
- DECLARE_SCHEME_CALLBACK (print, (SCM));
- DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- static Stencil line_stencil (Grob *me, Offset f, Offset t);
- DECLARE_GROB_INTERFACE();
-
-private:
- static Offset get_broken_offset (Grob *me, Direction dir);
- static Offset broken_trend_offset (Grob *me, Direction dir);
-};
-
-#endif /* LINE_SPANNER_HH */
SCM ly_make_anonymous_module (bool safe);
SCM ly_module_copy (SCM dest, SCM src);
-SCM ly_module2alist (SCM mod);
+SCM ly_module_2_alist (SCM mod);
SCM ly_module_lookup (SCM module, SCM sym);
SCM ly_modules_lookup (SCM modules, SCM sym, SCM);
SCM ly_module_symbols (SCM mod);
ADD_SCM_INIT_FUNC (init_type_ ## CL, init_type_ ## CL)
#define IMPLEMENT_BASE_SMOBS(CL) \
+ void \
+ CL ## _type_adder () \
+ {\
+ ly_add_type_predicate ((void*) &CL::unsmob, #CL); \
+ }\
+ ADD_SCM_INIT_FUNC(CL ## _type_adder_ctor, \
+ CL ## _type_adder);\
+ const char *CL::smob_name_ = #CL; \
scm_t_bits CL::smob_tag_; \
SCM \
CL::smob_p (SCM s) \
};
DECLARE_UNSMOB (Music_output, music_output);
-
+Paper_score *unsmob_paper_score (SCM);
+Performance *unsmob_performance (SCM);
#endif /* MUSIC_OUTPUT_HH */
Music *unsmob_music (SCM);
Music *make_music_by_name (SCM sym);
SCM ly_music_deep_copy (SCM);
-SCM ly_camel_case_to_lisp_identifier (SCM name_sym);
+SCM ly_camel_case_2_lisp_identifier (SCM name_sym);
extern SCM ly_music_p_proc;
#define DECLARE_BASE_SMOBS(CL) \
friend class Non_existent_class; \
private: \
+ static const char* smob_name_; \
static scm_t_bits smob_tag_; \
static SCM mark_smob (SCM); \
static size_t free_smob (SCM s); \
static int print_smob (SCM s, SCM p, scm_print_state*); \
public: \
static SCM equal_p (SCM a, SCM b); \
- static CL *unsmob (SCM s) \
+ static CL *unsmob (SCM s) __attribute__((pure)) \
{ \
if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_) \
return (CL *) SCM_CELL_WORD_1 (s); \
+++ /dev/null
-/*
- text-spanner.hh -- declare Text_spanner
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000--2007 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef TEXT_SPANNER_HH
-#define TEXT_SPANNER_HH
-
-#include "grob-interface.hh"
-#include "lily-proto.hh"
-
-class Text_spanner
-{
-public:
- DECLARE_SCHEME_CALLBACK (print, (SCM));
- DECLARE_GROB_INTERFACE();
-};
-
-#endif /* TEXT_SPANNER_HH */
/* We don't use IMPLEMENT_TYPE_P, since the smobification part is
implemented separately from the class. */
-LY_DEFINE (ly_input, "ly:input-location?", 1, 0, 0,
+LY_DEFINE (ly_input_location_p, "ly:input-location?", 1, 0, 0,
(SCM x),
"Is @var{x} an @code{input-location}?")
{
"location in @var{sip}. @var{msg} is interpreted similar to @code{format}'s argument\n")
{
Input *ip = unsmob_input (sip);
- SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
- SCM_ASSERT_TYPE (scm_is_string (msg), msg, SCM_ARG2, __FUNCTION__, "string");
+
+ LY_ASSERT_TYPE (unsmob_input, sip, 1);
+ LY_ASSERT_TYPE(scm_is_string, msg,2);
msg = scm_simple_format (SCM_BOOL_F, msg, rest);
}
-LY_DEFINE (ly_input_file_line_column,
+LY_DEFINE (ly_input_file_line_char_column,
"ly:input-file-line-char-column",
1, 0, 0, (SCM sip),
"Return input location in @var{sip} as (file-name line char column).")
{
+ LY_ASSERT_TYPE (unsmob_input, sip, 1);
Input *ip = unsmob_input (sip);
- SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
int l = 0;
int ch = 0;
"Return input location in @var{sip} as "
"(file-name first-line first-column last-line last-column).")
{
+
+ LY_ASSERT_TYPE (unsmob_input, sip, 1);
Input *ip = unsmob_input (sip);
- SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
+
return scm_list_5 (ly_string2scm (ip->file_string ()),
scm_from_int (ip->line_number ()),
scm_from_int (ip->column_number ()),
"The break status dir of item @var{it}. @code{-1} is end of "
"line, @code{0} unbroken, and @code{1} begin of line.")
{
- Item *me = dynamic_cast<Item *> (unsmob_grob (it));
- SCM_ASSERT_TYPE (me, it, SCM_ARG1, __FUNCTION__, "Item");
+ LY_ASSERT_TYPE (unsmob_item, it, 1);
+ Item *me = unsmob_item (it);
return scm_from_int (me->break_status_dir ());
}
char *
ly_scm2newstr (SCM str, size_t *lenp)
{
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, str, 1);
size_t len = scm_i_string_length (str);
if (char *new_str = (char *) malloc ((len + 1) * sizeof (char)))
cxx_id = "ly:" + cxx_id;
}
if (cxx_id.substr (cxx_id.length () - 2) == "_p")
- cxx_id = cxx_id.replace (cxx_id.length () - 2, 1, "?");
+ cxx_id = cxx_id.replace (cxx_id.length () - 2, 2, "?");
else if (cxx_id.substr (cxx_id.length () - 2) == "_x")
- cxx_id = cxx_id.replace (cxx_id.length () - 2, 1, "!");
+ cxx_id = cxx_id.replace (cxx_id.length () - 2, 2, "!");
+ cxx_id = replace_all (cxx_id, "_less?", "<?");
+ cxx_id = replace_all (cxx_id, "_2_", "->");
+ cxx_id = replace_all (cxx_id, "__", "::");
cxx_id = replace_all (cxx_id, '_', '-');
+
+
return cxx_id;
}
1, 0, 0, (SCM lexer),
"Return a list of (KEY . CODE) pairs, signifying the lilypond reserved words list.")
{
+ LY_ASSERT_SMOB (Lily_lexer, lexer, 1);
+
Lily_lexer * lex = Lily_lexer::unsmob (lexer);
- SCM_ASSERT_TYPE(lex, lexer, SCM_ARG1, __FUNCTION__, "lily lexer");
return lex->keyword_list ();
}
"Parse a single @code{.ly} file. "
"Upon failure, throw @code{ly-file-failed} key.")
{
- SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, name, 1);
string file = ly_scm2string (name);
char const *extensions[] = {"ly", "", 0};
/*
outside the if-else to ensure cleanup fo Sources object,
- */
+ */
if (error)
/* TODO: pass renamed input file too. */
scm_throw (ly_symbol2scm ("ly-file-failed"),
1, 0, 0, (SCM parser_smob),
"Return a clone of @var{parser-smob}.")
{
+ LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
Lily_parser *parser = unsmob_lily_parser (parser_smob);
Lily_parser *clone = new Lily_parser (*parser);
return clone->unprotect ();
}
-LY_DEFINE (ly_parser_define, "ly:parser-define!",
+LY_DEFINE (ly_parser_define_x, "ly:parser-define!",
3, 0, 0, (SCM parser_smob, SCM symbol, SCM val),
"Bind @var{symbol} to @var{val} in @var{parser-smob}'s module.")
{
+
+ LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
Lily_parser *parser = unsmob_lily_parser (parser_smob);
- SCM_ASSERT_TYPE (scm_is_symbol (symbol), symbol, SCM_ARG2, __FUNCTION__, "symbol");
- SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG2, __FUNCTION__, "parser");
+ LY_ASSERT_TYPE (ly_is_symbol,symbol, 2);
+
parser->lexer_->set_identifier (scm_symbol_to_string (symbol), val);
return SCM_UNSPECIFIED;
}
"Lookup @var{symbol} in @var{parser-smob}'s module. "
"Undefined is '().")
{
- Lily_parser *parser = unsmob_lily_parser (parser_smob);
+ LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
- SCM_ASSERT_TYPE (scm_is_symbol (symbol), symbol, SCM_ARG2, __FUNCTION__, "symbol");
- SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG2, __FUNCTION__, "parser");
+ Lily_parser *parser = unsmob_lily_parser (parser_smob);
+
+ LY_ASSERT_TYPE (ly_is_symbol,symbol, 2);
SCM val = parser->lexer_->lookup_identifier (ly_scm2string (scm_symbol_to_string (symbol)));
if (val != SCM_UNDEFINED)
"Parse the string @code{ly-code} with @code{parser-smob}."
"Upon failure, throw @code{ly-file-failed} key.")
{
- Lily_parser *parser = unsmob_lily_parser (parser_smob);
-
- SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "parser");
- SCM_ASSERT_TYPE (scm_is_string (ly_code), ly_code, SCM_ARG2, __FUNCTION__, "string");
+ LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
+ Lily_parser *parser = unsmob_lily_parser (parser_smob);
+ LY_ASSERT_TYPE(scm_is_string,ly_code, 2);
parser->parse_string (ly_scm2string (ly_code));
"@var{names} is an alist of symbols. "
"This only has effect if the current mode is notes.")
{
+ LY_ASSERT_SMOB (Lily_parser, parser, 1);
Lily_parser *p = unsmob_lily_parser (parser);
- SCM_ASSERT_TYPE (p, parser, SCM_ARG1, __FUNCTION__, "Lilypond parser");
if (p->lexer_->is_note_state ())
{
1, 0, 0, (SCM parser),
"Return the base name of the output file.")
{
+ LY_ASSERT_SMOB (Lily_parser, parser, 1);
Lily_parser *p = unsmob_lily_parser (parser);
- SCM_ASSERT_TYPE (p, parser, SCM_ARG1, __FUNCTION__, "Lilypond parser");
return ly_string2scm (p->output_basename_);
}
2, 1, 0, (SCM parser, SCM msg, SCM input),
"Display an error message, and make the parser fail")
{
+ LY_ASSERT_SMOB (Lily_parser, parser, 1);
Lily_parser *p = unsmob_lily_parser (parser);
- SCM_ASSERT_TYPE (p, parser, SCM_ARG1, __FUNCTION__, "Lilypond parser");
- SCM_ASSERT_TYPE (scm_is_string (msg), msg, SCM_ARG2, __FUNCTION__, "string");
+
+ LY_ASSERT_TYPE(scm_is_string,msg, 2);
string s = ly_scm2string (msg);
Input *i = unsmob_input (input);
1, 0, 0, (SCM parser),
"Clear the error flag for the parser.")
{
+ LY_ASSERT_SMOB (Lily_parser, parser, 1);
Lily_parser *p = unsmob_lily_parser (parser);
- SCM_ASSERT_TYPE (p, parser, SCM_ARG1, __FUNCTION__, "Lilypond parser");
+
p->error_level_ = 0;
p->lexer_->error_level_ = 0;
1, 0, 0, (SCM parser),
"Does @var{parser} have an error flag?")
{
+ LY_ASSERT_SMOB (Lily_parser, parser, 1);
Lily_parser *p = unsmob_lily_parser (parser);
- SCM_ASSERT_TYPE (p, parser, SCM_ARG1, __FUNCTION__, "Lilypond parser");
return scm_from_bool (p->error_level_ || p->lexer_->error_level_);
}
alist_chain));
Stencil elt = fm->find_by_name ("scripts.trill_element");
-
+ elt.align_to (Y_AXIS, CENTER);
Real elt_len = elt.extent (X_AXIS).length ();
if (elt_len <= 0.0)
{
}
while (len + elt_len < dz.length ());
- line.rotate (dz.arg (), Offset (0,0));
+ line.rotate (dz.arg (), Offset (LEFT, CENTER));
line.translate (from);
return line;
Real period = Staff_symbol_referencer::staff_space (me)
* robust_scm2double (me->get_property ("dash-period"), 1.0);
- if (period < 0)
+ if (period <= 0)
return Stencil ();
+ Real len = (to-from).length();
+
+ int n = (int) rint ((len - period * fraction) / period);
+ if (n > 0)
+ {
+ /*
+ TODO: figure out something intelligent for really short
+ sections.
+ */
+ period = ((to-from).length() - period * fraction) / n;
+ }
stil = make_dashed_line (thick, from, to, period, fraction);
}
else
(c) 2000--2007 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include "line-spanner.hh"
-
-
#include "spanner.hh"
#include "output-def.hh"
-#include "paper-column.hh"
+#include "item.hh"
#include "staff-symbol-referencer.hh"
#include "font-interface.hh"
#include "warn.hh"
#include "align-interface.hh"
-#include "lookup.hh"
#include "line-interface.hh"
+#include "moment.hh"
-MAKE_SCHEME_CALLBACK (Line_spanner, after_line_breaking, 1);
-SCM
-Line_spanner::after_line_breaking (SCM g)
-{
- Grob *me = unsmob_grob (g);
- Spanner *sp = dynamic_cast<Spanner *> (me);
-
- /*
- We remove the line at the start of the line. For piano voice
- indicators, it makes no sense to have them at the start of the
- line.
-
- I'm not sure what the official rules for glissandi are, but
- usually the 2nd note of the glissando is "exact", so when playing
- from the start of the line, there is no need to glide.
-
- From a typographical p.o.v. this makes sense, since the amount of
- space left of a note at the start of a line is very small.
+#include "lily-proto.hh"
+#include "grob-interface.hh"
+#include "text-interface.hh"
- --hwn.
-
- */
- if (sp->get_bound (LEFT)->break_status_dir ()
- && !sp->get_bound (RIGHT)->break_status_dir ())
- {
- /*
- Can't do suicide, since this mucks up finding the trend.
- */
- me->set_property ("transparent", SCM_BOOL_T);
- }
- return SCM_EOL;
-}
-
-Stencil
-Line_spanner::line_stencil (Grob *me,
- Offset from,
- Offset to)
+class Line_spanner
{
- Stencil line = Line_interface::line (me, from, to);
-
- if (to_boolean (me->get_property ("arrow")))
- line.add_stencil (Line_interface::arrows (me, from, to, false, true));
-
- return line;
-}
-
-/*
- Find a common Y parent, which --if found-- should be the
- fixed-distance alignment.
-*/
-Grob *
+public:
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
+ DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_left_bound_info, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_left_bound_info_and_text, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_right_bound_info, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_bound_info, (SCM, Direction));
+ DECLARE_GROB_INTERFACE();
+};
+
+
+static Grob *
line_spanner_common_parent (Grob *me)
{
Grob *common = find_fixed_alignment_parent (me);
return common;
}
-/*
- Warning: this thing is a cross-staff object, so it should have empty Y-dimensions.
-
- (If not, you risk that this is called from the staff-alignment
- routine, via stencil_extent. At this point, the staves aren't
- separated yet, so it doesn't work cross-staff.
-
- (huh? crossable staves have fixed distance? --hwn)
-*/
-
-MAKE_SCHEME_CALLBACK (Line_spanner, print, 1);
SCM
-Line_spanner::print (SCM smob)
+Line_spanner::calc_bound_info (SCM smob, Direction dir)
{
- Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+ Spanner *me = unsmob_spanner (smob);
- Drul_array<Item *> bound (me->get_bound (LEFT),
- me->get_bound (RIGHT));
+ Grob *commonx = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
+ commonx = me->common_refpoint (commonx, X_AXIS);
- Real gap = robust_scm2double (me->get_property ("gap"), 0.0);
+ SCM bound_details = me->get_property ("bound-details");
- Offset ofxy (gap, 0); /* offset from start point to start of line */
- Offset dxy;
- Offset my_off;
- Offset his_off;
+ SCM details = SCM_BOOL_F;
+ if (details == SCM_BOOL_F)
+ details = ly_assoc_get ((dir == LEFT)
+ ? ly_symbol2scm ("left")
+ : ly_symbol2scm ("right"), bound_details, SCM_BOOL_F);
- Real extra_dy = robust_scm2double (me->get_property ("extra-dy"),
- 0.0);
-
- if (bound[RIGHT]->break_status_dir ())
+ if (me->get_bound (dir)->break_status_dir ())
{
- if (bound[LEFT]->break_status_dir ())
- {
- programming_error ("line-spanner with two broken ends. Farewell sweet world.");
+ SCM extra = ly_assoc_get ((dir == LEFT)
+ ? ly_symbol2scm ("left-broken")
+ : ly_symbol2scm ("right-broken"), bound_details, SCM_EOL);
- me->suicide ();
- return SCM_EOL;
- }
+ for (SCM s = extra; scm_is_pair (s); s = scm_cdr (s))
+ details = scm_cons (scm_car (s), details);
+ }
+
+ if (details == SCM_BOOL_F)
+ details = ly_assoc_get (ly_symbol2scm ("default"), bound_details, SCM_EOL);
- /*
- This is hairy. For the normal case, we simply find common
- parents, and draw a line between the bounds. When two note
- heads are on different systems, there is no common parent
- anymore. We have to find the piano-staff object.
- */
+ SCM text = ly_assoc_get (ly_symbol2scm ("text"), details, SCM_BOOL_F);
+ if (Text_interface::is_markup (text))
+ {
+ Output_def *layout = me->layout ();
+ SCM properties = Font_interface::text_font_alist_chain (me);
+ details = scm_acons (ly_symbol2scm ("stencil"),
+ Text_interface::interpret_markup (layout->self_scm (),
+ properties, text),
+ details);
+ }
+
+ if (!scm_is_number (ly_assoc_get (ly_symbol2scm ("X"), details, SCM_BOOL_F)))
+ {
+ Direction attach = (Direction)
+ robust_scm2int (ly_assoc_get (ly_symbol2scm ("attach-dir"),
+ details, SCM_BOOL_F),
+ CENTER);
+
+ details = scm_acons (ly_symbol2scm ("X"),
+ scm_from_double (me->get_bound (dir)->extent (commonx, X_AXIS)
+ .linear_combination (attach)),
+ details);
+ }
+
- Spanner *next_sp = me->broken_neighbor (RIGHT);
- Item *next_bound = next_sp->get_bound (RIGHT);
+ if (!scm_is_number (ly_assoc_get (ly_symbol2scm ("Y"), details, SCM_BOOL_F)))
+ {
+ Real y = 0.0;
- if (next_bound->break_status_dir ())
+ Real extra_dy = robust_scm2double (me->get_property ("extra-dy"),
+ 0.0);
+
+ if (me->get_bound (dir)->break_status_dir ())
+ {
+ /*
+ This is hairy. For the normal case, we simply find common
+ parents, and draw a line between the bounds. When two note
+ heads are on different systems, there is no common parent
+ anymore. We have to find the piano-staff object.
+ */
+
+ Spanner *next_sp = me->broken_neighbor (dir);
+ Item *next_bound = next_sp->get_bound (dir);
+
+ if (next_bound->break_status_dir ())
+ {
+ programming_error ("no note heads for the line spanner on neighbor line?"
+ " Confused.");
+ me->suicide ();
+ return SCM_EOL;
+ }
+
+ Grob *next_common_y = line_spanner_common_parent (next_bound);
+ Interval next_ext = next_bound->extent (next_common_y, Y_AXIS);
+
+ y = next_ext.center ();
+ }
+ else
{
- programming_error ("no note heads for the line spanner on next line?"
- " Confused.");
- me->suicide ();
- return SCM_EOL;
+ Grob *commony = me->common_refpoint (me->get_bound (dir), Y_AXIS);
+ y = me->get_bound (dir)->extent (commony, Y_AXIS).center();
+ details = scm_acons (ly_symbol2scm ("common-Y"), commony->self_scm (), details);
}
- Grob *commonx = bound[LEFT]->common_refpoint (bound[RIGHT], X_AXIS);
- commonx = me->common_refpoint (commonx, X_AXIS);
+ y += dir * extra_dy / 2;
+ details = scm_acons (ly_symbol2scm ("Y"), scm_from_double (y), details);
+ }
- Grob *next_common_y = line_spanner_common_parent (next_bound);
- Grob *this_common_y = line_spanner_common_parent (bound[LEFT]);
+ return details;
+}
- Grob *all_common_y = me->common_refpoint (this_common_y, Y_AXIS);
+MAKE_SCHEME_CALLBACK (Line_spanner, calc_right_bound_info, 1);
+SCM
+Line_spanner::calc_right_bound_info (SCM smob)
+{
+ return Line_spanner::calc_bound_info (smob, RIGHT);
+}
- Interval next_ext = next_bound->extent (next_common_y, Y_AXIS);
- Interval this_ext = bound[LEFT]->extent (this_common_y, Y_AXIS);
+MAKE_SCHEME_CALLBACK (Line_spanner, calc_left_bound_info, 1);
+SCM
+Line_spanner::calc_left_bound_info (SCM smob)
+{
+ return Line_spanner::calc_bound_info (smob, LEFT);
+}
- Real yoff = this_common_y->relative_coordinate (all_common_y, Y_AXIS);
+MAKE_SCHEME_CALLBACK (Line_spanner, calc_left_bound_info_and_text, 1);
+SCM
+Line_spanner::calc_left_bound_info_and_text (SCM smob)
+{
+ SCM alist = Line_spanner::calc_bound_info (smob, LEFT);
+ Spanner *me = unsmob_spanner (smob);
- Offset p1 (bound[LEFT]->extent (commonx, X_AXIS)[RIGHT],
- this_ext.center () + yoff - extra_dy / 2);
- Offset p2 (bound[RIGHT]->extent (commonx, X_AXIS)[LEFT],
- next_ext.center () + yoff + extra_dy / 2);
+ SCM text = me->get_property ("text");
+ if (Text_interface::is_markup (text)
+ && me->get_bound (LEFT)->break_status_dir () == CENTER
+ && ly_assoc_get (ly_symbol2scm ("stencil"), alist, SCM_BOOL_F) == SCM_BOOL_F)
+ {
+ Output_def *layout = me->layout ();
+ SCM properties = Font_interface::text_font_alist_chain (me);
+ alist = scm_acons (ly_symbol2scm ("stencil"),
+ Text_interface::interpret_markup (layout->self_scm (),
+ properties, text),
+ alist);
+ }
+
+ return alist;
+}
- Offset dz (p2 - p1);
- Real len = dz.length ();
+MAKE_SCHEME_CALLBACK (Line_spanner, print, 1);
+SCM
+Line_spanner::print (SCM smob)
+{
+ Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
- Offset dir = dz * (1 / len);
- dz = (dz.length () - 2 * gap) * dir;
+ Interval_t<Moment> moments = me->spanned_time ();
+ /*
+ We remove the line at the start of the line. For piano voice
+ indicators, it makes no sense to have them at the start of the
+ line.
- Stencil l (line_stencil (me, Offset (0, 0), dz));
+ I'm not sure what the official rules for glissandi are, but
+ usually the 2nd note of the glissando is "exact", so when playing
+ from the start of the line, there is no need to glide.
- l.translate (dir * gap + p1
- - Offset (me->relative_coordinate (commonx, X_AXIS),
- me->relative_coordinate (all_common_y, Y_AXIS)));
+ From a typographical p.o.v. this makes sense, since the amount of
+ space left of a note at the start of a line is very small.
+
+ --hwn.
+
+ */
+ if (moments.length () == Moment (0,0))
+ return SCM_EOL;
+
+ Drul_array<SCM> bounds (me->get_property ("left-bound-info"),
+ me->get_property ("right-bound-info"));
- return l.smobbed_copy ();
+
+ Grob *commonx = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
+ commonx = me->common_refpoint (commonx, X_AXIS);
+
+ Drul_array<Offset> span_points;
+
+ Direction d = LEFT;
+ do
+ {
+ Offset z (robust_scm2double (ly_assoc_get (ly_symbol2scm ("X"),
+ bounds[d], SCM_BOOL_F), 0.0)
+ + commonx->relative_coordinate (commonx, X_AXIS),
+ robust_scm2double (ly_assoc_get (ly_symbol2scm ("Y"),
+ bounds[d], SCM_BOOL_F), 0.0));
+
+ span_points[d] = z;
}
- else
+ while (flip (&d) != LEFT);
+
+ Drul_array<Real> gaps (0, 0);
+ Drul_array<bool> arrows (0, 0);
+ Drul_array<Stencil*> stencils (0,0);
+ Drul_array<Grob*> common_y (0, 0);
+ do
{
- Grob *common[] = { me, me };
- for (int a = X_AXIS; a < NO_AXES; a++)
- {
- common[a] = me->common_refpoint (bound[RIGHT], Axis (a));
- common[a] = common[a]->common_refpoint (bound[LEFT], Axis (a));
- }
+ gaps[d] = robust_scm2double (ly_assoc_get (ly_symbol2scm ("padding"),
+ bounds[d], SCM_BOOL_F), 0.0);
+ arrows[d] = to_boolean (ly_assoc_get (ly_symbol2scm ("arrow"),
+ bounds[d], SCM_BOOL_F));
+ stencils[d] = unsmob_stencil (ly_assoc_get (ly_symbol2scm ("stencil"),
+ bounds[d], SCM_BOOL_F));
+ common_y[d] = unsmob_grob (ly_assoc_get (ly_symbol2scm ("common-Y"),
+ bounds[d], SCM_BOOL_F));
+ if (!common_y[d])
+ common_y[d] = me;
+ }
+ while (flip (&d) != LEFT);
- // distance from center to start of line
- Real off = gap + ((bound[LEFT]->extent (bound[LEFT], X_AXIS).length () * 3) / 4);
+ Grob *my_common_y = common_y[LEFT]->common_refpoint (common_y[RIGHT], Y_AXIS);
+ do
+ span_points[d][Y_AXIS] += common_y[d]->relative_coordinate (my_common_y, Y_AXIS);
+ while (flip (&d) != LEFT);
- for (int a = X_AXIS; a < NO_AXES; a++)
- {
- Axis ax = (Axis)a;
- dxy[ax]
- = + robust_relative_extent (bound[RIGHT], common[X_AXIS], ax).center ()
- - robust_relative_extent (bound[LEFT], common[X_AXIS], ax).center ();
+ Offset dz = (span_points[RIGHT] - span_points[LEFT]);
+ Offset dz_dir = dz.direction ();
+ if (gaps[LEFT] + gaps[RIGHT] > dz.length ())
+ {
+ return SCM_EOL;
+ }
- my_off[ax] = me->relative_coordinate (common[a], ax);
- his_off[ax] = bound[LEFT]->relative_coordinate (common[a], ax);
+ Stencil line;
+ do
+ {
+ if (stencils[d])
+ {
+ Stencil s = stencils[d]->translated (span_points[d]);
+ SCM align = ly_assoc_get (ly_symbol2scm ("stencil-align-dir-y"),
+ bounds[d], SCM_BOOL_F);
+ SCM off = ly_assoc_get (ly_symbol2scm ("stencil-offset"),
+ bounds[d], SCM_BOOL_F);
+
+ if (scm_is_number (align))
+ s.align_to (Y_AXIS, scm_to_double (align));
+
+ /*
+ todo: should use font-size.
+ */
+ if (is_number_pair (off))
+ s.translate (ly_scm2offset (off));
+
+ line.add_stencil (s);
}
+ }
+ while (flip (&d) != LEFT);
- ofxy = dxy * (off / dxy.length ()) ;
- dxy -= 2*ofxy;
-
- dxy[Y_AXIS] += extra_dy;
+ do
+ {
+ if (stencils[d])
+ span_points[d] += dz_dir *
+ (stencils[d]->extent (X_AXIS)[-d] / dz_dir[X_AXIS]);
- Stencil line = line_stencil (me, Offset (0, 0), dxy);
-
- line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length () / 2, X_AXIS);
- line.translate (ofxy - my_off + his_off + Offset (0, -extra_dy/2));
- return line.smobbed_copy ();
+ span_points[d] += -d * gaps[d] * dz.direction ();
}
+ while (flip (&d) != LEFT);
+
+ line.add_stencil (Line_interface::line (me,
+ span_points[LEFT],
+ span_points[RIGHT]));
+
+ line.add_stencil (Line_interface::arrows (me,
+ span_points[LEFT],
+ span_points[RIGHT],
+ arrows[LEFT],
+ arrows[RIGHT]));
+
+ line.translate (Offset (-me->relative_coordinate (commonx, X_AXIS),
+ -me->relative_coordinate (my_common_y, Y_AXIS)));
+
+
+ return line.smobbed_copy ();
}
ADD_INTERFACE (Line_spanner,
"\n",
"extra-dy "
- "arrow "
"gap "
"thickness "
+ "bound-details "
+ "left-bound-info "
+ "right-bound-info "
);
return result;
}
-LY_DEFINE (ly_module2alist, "ly:module->alist",
+LY_DEFINE (ly_module_2_alist, "ly:module->alist",
1, 0, 0, (SCM mod),
"Dump the contents of module @var{mod} as an alist.")
{
"notes, and @var{g} the timing for grace notes. "
"In absence of grace notes, @var{g} is zero.\n")
{
- SCM_ASSERT_TYPE (scm_is_integer (n), n, SCM_ARG1, __FUNCTION__, "integer");
- SCM_ASSERT_TYPE (scm_is_integer (d), d, SCM_ARG2, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE (scm_is_integer, n, 1);
+ LY_ASSERT_TYPE(scm_is_integer,d, 2);
int grace_num = 0;
if (gn != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_integer (gn), gn, SCM_ARG3, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE(scm_is_integer,gn, 3);
grace_num = scm_to_int (gn);
}
int grace_den = 1;
if (gd != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_integer (gd), gd, SCM_ARG4, __FUNCTION__, "integer");
+ LY_ASSERT_TYPE(scm_is_integer,gd, 4);
grace_den = scm_to_int (gd);
}
Rational (grace_num, grace_den)).smobbed_copy ();
}
-LY_DEFINE (ly_sub_moment, "ly:moment-sub",
+LY_DEFINE (ly_moment_sub, "ly:moment-sub",
2, 0, 0, (SCM a, SCM b),
"Subtract two moments.")
{
+ LY_ASSERT_SMOB (Moment, a, 1);
+ LY_ASSERT_SMOB (Moment,b, 2);
+
Moment *ma = unsmob_moment (a);
Moment *mb = unsmob_moment (b);
- SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
- SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
+
return (*ma - *mb).smobbed_copy ();
}
2, 0, 0, (SCM a, SCM b),
"Add two moments.")
{
+ LY_ASSERT_SMOB (Moment, a, 1);
+ LY_ASSERT_SMOB(Moment,b, 2);
+
Moment *ma = unsmob_moment (a);
Moment *mb = unsmob_moment (b);
- SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
- SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
+
return (*ma + *mb).smobbed_copy ();
}
2, 0, 0, (SCM a, SCM b),
"Multiply two moments.")
{
+ LY_ASSERT_SMOB (Moment, a, 1);
+ LY_ASSERT_SMOB(Moment, b, 2);
+
Moment *ma = unsmob_moment (a);
Moment *mb = unsmob_moment (b);
- SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
- SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
return (*ma * * mb).smobbed_copy ();
}
2, 0, 0, (SCM a, SCM b),
"Divide two moments.")
{
+ LY_ASSERT_SMOB (Moment, a, 1);
+ LY_ASSERT_SMOB(Moment, b, 2);
+
Moment *ma = unsmob_moment (a);
Moment *mb = unsmob_moment (b);
- SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
- SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
+
return (*ma / * mb).smobbed_copy ();
}
2, 0, 0, (SCM a, SCM b),
"Modulo of two moments.")
{
+ LY_ASSERT_SMOB (Moment, a, 1);
+ LY_ASSERT_SMOB(Moment, b, 2);
+
Moment *ma = unsmob_moment (a);
Moment *mb = unsmob_moment (b);
- SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
- SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
return (*ma % * mb).smobbed_copy ();
}
1, 0, 0, (SCM mom),
"Extract numerator from grace timing.")
{
+ LY_ASSERT_SMOB (Moment, mom, 1);
+
Moment *ma = unsmob_moment (mom);
- SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment");
return scm_from_int (ma->grace_part_.numerator ());
}
1, 0, 0, (SCM mom),
"Extract denominator from grace timing.")
{
+ LY_ASSERT_SMOB (Moment, mom, 1);
Moment *ma = unsmob_moment (mom);
- SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment");
return scm_from_int (ma->grace_part_.denominator ());
}
1, 0, 0, (SCM mom),
"Extract numerator from main timing.")
{
+ LY_ASSERT_SMOB (Moment, mom, 1);
Moment *ma = unsmob_moment (mom);
- SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment");
return scm_from_int (ma->main_part_.numerator ());
}
1, 0, 0, (SCM mom),
"Extract denominator from main timing.")
{
+ LY_ASSERT_SMOB (Moment, mom, 1);
Moment *ma = unsmob_moment (mom);
- SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment");
return scm_from_int (ma->main_part_.denominator ());
}
2, 0, 0, (SCM a, SCM b),
"Compare two moments.")
{
+ LY_ASSERT_SMOB (Moment, a, 1);
+ LY_ASSERT_SMOB (Moment, b, 2);
+
Moment *ma = unsmob_moment (a);
Moment *mb = unsmob_moment (b);
- SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
- SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
+
return ly_bool2scm (*ma < *mb);
}
(SCM x),
"Return the Scheme function inside @var{x}")
{
- SCM_ASSERT_TYPE(is_music_function (x), x, SCM_ARG1, __FUNCTION__,
- "music function");
+ LY_ASSERT_TYPE (is_music_function, x, 1);
return SCM_CELL_OBJECT_1(x);
}
"Its arguments. @code{signature} is a list containing either "
"@code{ly:music?} predicates or other type predicates.")
{
- SCM_ASSERT_TYPE(ly_is_procedure (func), func, SCM_ARG1, __FUNCTION__, "function");
+ LY_ASSERT_TYPE (ly_is_procedure, func, 1);
return make_music_function (signature, func);
}
1, 0, 0, (SCM mus),
"Get the length of music expression @var{mus}, and return as a @code{Moment} object.")
{
+ LY_ASSERT_TYPE (unsmob_music, mus, 1);
Music *sc = unsmob_music (mus);
- SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
return sc->get_length ().smobbed_copy ();
}
"Get the property @var{sym} of music expression @var{mus}.\n"
"If @var{sym} is undefined, return @code{'()}.\n")
{
- Music *sc = unsmob_music (mus);
- SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
+ LY_ASSERT_TYPE (unsmob_music, mus, 1);
return ly_prob_property (mus,sym,dfault);
}
-LY_DEFINE (ly_music_set_property, "ly:music-set-property!",
+LY_DEFINE (ly_music_set_property_x, "ly:music-set-property!",
3, 0, 0, (SCM mus, SCM sym, SCM val),
"Set property @var{sym} in music expression @var{mus} to @var{val}.")
{
- Music *sc = unsmob_music (mus);
- SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
+ LY_ASSERT_TYPE (unsmob_music, mus, 1);
+
return ly_prob_set_property_x (mus, sym, val);
}
"they are constant and initialized by the "
"@code{make-music} function.\n")
{
+ LY_ASSERT_TYPE (unsmob_music, mus, 1);
Music *m = unsmob_music (mus);
- SCM_ASSERT_TYPE (m, mus, SCM_ARG1, __FUNCTION__, "music");
return m->get_property_alist (true);
}
"Transpose @var{m} such that central C is mapped to @var{p}. "
"Return @var{m}.")
{
+ LY_ASSERT_TYPE (unsmob_music, m, 1);
+ LY_ASSERT_SMOB (Pitch, p, 2);
+
Music *sc = unsmob_music (m);
Pitch *sp = unsmob_pitch (p);
- SCM_ASSERT_TYPE (sc, m, SCM_ARG1, __FUNCTION__, "music");
- SCM_ASSERT_TYPE (sp, p, SCM_ARG2, __FUNCTION__, "pitch");
sc->transpose (*sp);
// SCM_UNDEFINED ?
2, 0, 0, (SCM m, SCM factor),
"Compress music object @var{m} by moment @var{factor}.")
{
- Music *sc = unsmob_music (m);
-
- SCM_ASSERT_TYPE (sc, m, SCM_ARG1, __FUNCTION__, "music");
- SCM_ASSERT_TYPE (unsmob_moment (factor), factor, SCM_ARG2, __FUNCTION__, "moment");
+ LY_ASSERT_TYPE (unsmob_music, m, 1);
+ LY_ASSERT_TYPE(unsmob_moment,factor, 2);
+ Music *sc = unsmob_music (m);
sc->compress (*unsmob_moment (factor));
return sc->self_scm ();
}
(SCM mus),
"Extract the duration field from @var{mus}, and return the length.")
{
+ LY_ASSERT_TYPE (unsmob_music, mus, 1);
Music *m = unsmob_music (mus);
- SCM_ASSERT_TYPE (m, mus, SCM_ARG1, __FUNCTION__, "Music");
Duration *d = unsmob_duration (m->get_property ("duration"));
Moment len;
(SCM mus, SCM fact),
"Compress @var{mus} by factor @var{fact}, which is a @code{Moment}.")
{
+ LY_ASSERT_TYPE (unsmob_music, mus, 1);
+ LY_ASSERT_SMOB (Moment, fact, 2);
+
Music *m = unsmob_music (mus);
Moment *f = unsmob_moment (fact);
- SCM_ASSERT_TYPE (m, mus, SCM_ARG1, __FUNCTION__, "Music");
- SCM_ASSERT_TYPE (f, fact, SCM_ARG2, __FUNCTION__, "Moment");
Duration *d = unsmob_duration (m->get_property ("duration"));
if (d)
Stream_event *
Music::to_event () const
{
- SCM class_name = ly_camel_case_to_lisp_identifier (get_property ("name"));
+ SCM class_name = ly_camel_case_2_lisp_identifier (get_property ("name"));
// catch programming mistakes.
if (!internal_is_music_type (class_name))
+++ /dev/null
-/*
- line-spanner.cc -- implement New_line_spanner
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000--2007 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "spanner.hh"
-#include "output-def.hh"
-#include "paper-column.hh"
-#include "staff-symbol-referencer.hh"
-#include "font-interface.hh"
-#include "warn.hh"
-#include "align-interface.hh"
-#include "lookup.hh"
-#include "line-interface.hh"
-#include "moment.hh"
-
-#include "lily-proto.hh"
-#include "grob-interface.hh"
-#include "text-interface.hh"
-
-class New_line_spanner
-{
-public:
- DECLARE_SCHEME_CALLBACK (print, (SCM));
- DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
-
- DECLARE_SCHEME_CALLBACK (calc_left_bound_info, (SCM));
- DECLARE_SCHEME_CALLBACK (calc_left_bound_info_and_text, (SCM));
- DECLARE_SCHEME_CALLBACK (calc_right_bound_info, (SCM));
- DECLARE_SCHEME_CALLBACK (calc_bound_info, (SCM, Direction));
- DECLARE_GROB_INTERFACE();
-
- static Grob *common_y (Grob*);
-};
-
-Grob*
-New_line_spanner::common_y (Grob*me_grob)
-{
- Spanner *me = dynamic_cast<Spanner*> (me_grob);
-
- Grob *commony = me;
- Direction d = LEFT;
- do
- if (me->get_bound (d)->break_status_dir () == CENTER)
- commony = me->get_bound (d)->common_refpoint (commony, Y_AXIS);
- while (flip (&d) != LEFT);
-
- return commony;
-}
-
-static Grob *
-line_spanner_common_parent (Grob *me)
-{
- Grob *common = find_fixed_alignment_parent (me);
- if (!common)
- {
- common = Staff_symbol_referencer::get_staff_symbol (me);
- if (common)
- common = common->get_parent (Y_AXIS);
- else
- common = me->get_parent (Y_AXIS);
- }
-
- return common;
-}
-
-SCM
-New_line_spanner::calc_bound_info (SCM smob, Direction dir)
-{
- Spanner *me = unsmob_spanner (smob);
-
- Grob *commonx = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
- commonx = me->common_refpoint (commonx, X_AXIS);
-
- SCM bound_details = me->get_property ("bound-details");
-
- SCM details = SCM_BOOL_F;
- if (details == SCM_BOOL_F)
- details = ly_assoc_get ((dir == LEFT)
- ? ly_symbol2scm ("left")
- : ly_symbol2scm ("right"), bound_details, SCM_BOOL_F);
-
- if (me->get_bound (dir)->break_status_dir ())
- {
- SCM extra = ly_assoc_get ((dir == LEFT)
- ? ly_symbol2scm ("left-broken")
- : ly_symbol2scm ("right-broken"), bound_details, SCM_EOL);
-
- for (SCM s = extra; scm_is_pair (s); s = scm_cdr (s))
- details = scm_cons (scm_car (s), details);
- }
-
- if (details == SCM_BOOL_F)
- details = ly_assoc_get (ly_symbol2scm ("default"), bound_details, SCM_EOL);
-
- SCM text = ly_assoc_get (ly_symbol2scm ("text"), details, SCM_BOOL_F);
- if (Text_interface::is_markup (text))
- {
- Output_def *layout = me->layout ();
- SCM properties = Font_interface::text_font_alist_chain (me);
- details = scm_acons (ly_symbol2scm ("stencil"),
- Text_interface::interpret_markup (layout->self_scm (),
- properties, text),
- details);
- }
-
- if (!scm_is_number (ly_assoc_get (ly_symbol2scm ("X"), details, SCM_BOOL_F)))
- {
- Direction attach = (Direction)
- robust_scm2int (ly_assoc_get (ly_symbol2scm ("attach-dir"),
- details, SCM_BOOL_F),
- CENTER);
-
- details = scm_acons (ly_symbol2scm ("X"),
- scm_from_double (me->get_bound (dir)->extent (commonx, X_AXIS)
- .linear_combination (attach)),
- details);
- }
-
-
- if (!scm_is_number (ly_assoc_get (ly_symbol2scm ("Y"), details, SCM_BOOL_F)))
- {
- Real y = 0.0;
-
- Real extra_dy = robust_scm2double (me->get_property ("extra-dy"),
- 0.0);
-
- if (me->get_bound (dir)->break_status_dir ())
- {
- /*
- This is hairy. For the normal case, we simply find common
- parents, and draw a line between the bounds. When two note
- heads are on different systems, there is no common parent
- anymore. We have to find the piano-staff object.
- */
-
- Spanner *next_sp = me->broken_neighbor (dir);
- Item *next_bound = next_sp->get_bound (dir);
-
- if (next_bound->break_status_dir ())
- {
- programming_error ("no note heads for the line spanner on neighbor line?"
- " Confused.");
- me->suicide ();
- return SCM_EOL;
- }
-
- Grob *next_common_y = line_spanner_common_parent (next_bound);
- Interval next_ext = next_bound->extent (next_common_y, Y_AXIS);
-
- y = next_ext.center ();
- }
- else
- {
- Grob *commony = common_y (me);
- y = me->get_bound (dir)->extent (commony, Y_AXIS).center();
- }
-
- y += dir * extra_dy / 2;
- details = scm_acons (ly_symbol2scm ("Y"), scm_from_double (y), details);
- }
-
- return details;
-}
-
-MAKE_SCHEME_CALLBACK (New_line_spanner, calc_right_bound_info, 1);
-SCM
-New_line_spanner::calc_right_bound_info (SCM smob)
-{
- return New_line_spanner::calc_bound_info (smob, RIGHT);
-}
-
-MAKE_SCHEME_CALLBACK (New_line_spanner, calc_left_bound_info, 1);
-SCM
-New_line_spanner::calc_left_bound_info (SCM smob)
-{
- return New_line_spanner::calc_bound_info (smob, LEFT);
-}
-
-MAKE_SCHEME_CALLBACK (New_line_spanner, calc_left_bound_info_and_text, 1);
-SCM
-New_line_spanner::calc_left_bound_info_and_text (SCM smob)
-{
- SCM alist = New_line_spanner::calc_bound_info (smob, LEFT);
- Spanner *me = unsmob_spanner (smob);
-
- SCM text = me->get_property ("text");
- if (Text_interface::is_markup (text)
- && me->get_bound (LEFT)->break_status_dir () == CENTER
- && ly_assoc_get (ly_symbol2scm ("stencil"), alist, SCM_BOOL_F) == SCM_BOOL_F)
- {
- Output_def *layout = me->layout ();
- SCM properties = Font_interface::text_font_alist_chain (me);
- alist = scm_acons (ly_symbol2scm ("stencil"),
- Text_interface::interpret_markup (layout->self_scm (),
- properties, text),
- alist);
- }
-
- return alist;
-}
-
-MAKE_SCHEME_CALLBACK (New_line_spanner, print, 1);
-SCM
-New_line_spanner::print (SCM smob)
-{
- Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
-
- Interval_t<Moment> moments = me->spanned_time ();
- /*
- We remove the line at the start of the line. For piano voice
- indicators, it makes no sense to have them at the start of the
- line.
-
- I'm not sure what the official rules for glissandi are, but
- usually the 2nd note of the glissando is "exact", so when playing
- from the start of the line, there is no need to glide.
-
- From a typographical p.o.v. this makes sense, since the amount of
- space left of a note at the start of a line is very small.
-
- --hwn.
-
- */
- if (moments.length () == Moment (0,0))
- return SCM_EOL;
-
- Drul_array<SCM> bounds (me->get_property ("left-bound-info"),
- me->get_property ("right-bound-info"));
-
-
- Grob *commonx = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
- commonx = me->common_refpoint (commonx, X_AXIS);
-
- Drul_array<Offset> span_points;
-
- Direction d = LEFT;
- do
- {
- Offset z (robust_scm2double (ly_assoc_get (ly_symbol2scm ("X"),
- bounds[d], SCM_BOOL_F), 0.0)
- + commonx->relative_coordinate (commonx, X_AXIS),
- robust_scm2double (ly_assoc_get (ly_symbol2scm ("Y"),
- bounds[d], SCM_BOOL_F), 0.0));
-
- span_points[d] = z;
- }
- while (flip (&d) != LEFT);
-
- Offset dz = (span_points[RIGHT] - span_points[LEFT]);
- Offset dz_dir = dz.direction ();
- Drul_array<Real> gaps (0, 0);
- Drul_array<bool> arrows (0, 0);
- Drul_array<Stencil*> stencils (0,0);
- do
- {
- gaps[d] = robust_scm2double (ly_assoc_get (ly_symbol2scm ("padding"),
- bounds[d], SCM_BOOL_F), 0.0);
- arrows[d] = to_boolean (ly_assoc_get (ly_symbol2scm ("arrow"),
- bounds[d], SCM_BOOL_F));
- stencils[d] = unsmob_stencil (ly_assoc_get (ly_symbol2scm ("stencil"),
- bounds[d], SCM_BOOL_F));
-
- }
- while (flip (&d) != LEFT);
-
- if (gaps[LEFT] + gaps[RIGHT] > dz.length ())
- {
- return SCM_EOL;
- }
-
- Stencil line;
- do
- {
- if (stencils[d])
- {
- Stencil s = stencils[d]->translated (span_points[d]);
- SCM align = ly_assoc_get (ly_symbol2scm ("stencil-align-dir-y"),
- bounds[d], SCM_BOOL_F);
- SCM off = ly_assoc_get (ly_symbol2scm ("stencil-offset"),
- bounds[d], SCM_BOOL_F);
-
- if (scm_is_number (align))
- s.align_to (Y_AXIS, scm_to_double (align));
-
- /*
- todo: should use font-size.
- */
- if (is_number_pair (off))
- s.translate (ly_scm2offset (off));
-
- line.add_stencil (s);
- }
- }
- while (flip (&d) != LEFT);
-
- do
- {
- if (stencils[d])
- span_points[d] += dz_dir *
- (stencils[d]->extent (X_AXIS)[-d] / dz_dir[X_AXIS]);
-
-
- span_points[d] += -d * gaps[d] * dz.direction ();
- }
- while (flip (&d) != LEFT);
-
- line.add_stencil (Line_interface::line (me,
- span_points[LEFT],
- span_points[RIGHT]));
-
- line.add_stencil (Line_interface::arrows (me,
- span_points[LEFT],
- span_points[RIGHT],
- arrows[LEFT],
- arrows[RIGHT]));
- Grob *commony = common_y (me);
-
- line.translate (Offset (-me->relative_coordinate (commonx, X_AXIS),
- -me->relative_coordinate (commony, Y_AXIS)));
-
-
- return line.smobbed_copy ();
-}
-
-ADD_INTERFACE (New_line_spanner,
- "Generic line drawn between two objects, e.g. for use with glissandi.\n"
- "The property @code{style} can be @code{line}, "
- "@code{dashed-line}, @code{trill}, \n"
- "@code{dotted-line} or @code{zigzag}.\n"
- "\n",
-
- "extra-dy "
- "gap "
- "thickness "
- "bound-details "
- "left-bound-info "
- "right-bound-info "
- );
-
SCM
Note_collision_interface::calc_positioning_done (SCM smob)
{
- Grob *me = unsmob_grob (smob);
+ Grob *me = unsmob_grob (smob);
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
Drul_array<vector<Grob*> > cg = get_clash_groups (me);
Direction d = UP;
"Get attachment in @var{font-metric} for attaching a stem to notehead "
"@var{glyph-name}.")
{
+ LY_ASSERT_SMOB (Font_metric, font_metric, 1);
Font_metric *fm = unsmob_metrics (font_metric);
- SCM_ASSERT_TYPE(fm, font_metric, SCM_ARG1, __FUNCTION__, "font metric");
- SCM_ASSERT_TYPE(scm_is_string (glyph_name), glyph_name, SCM_ARG2, __FUNCTION__, "string");
+ LY_ASSERT_TYPE(scm_is_string,glyph_name, 2);
return ly_offset2scm (Note_head::get_stem_attachment (fm, ly_scm2string (glyph_name)));
}
"Given the font metric @var{font} of an OpenType font, return the "
"names of the subfonts within @var{font}.")
{
+ LY_ASSERT_SMOB (Font_metric, font, 1);
Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
return fm->sub_fonts ();
}
Modified_font_metric *fm
= dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
Open_type_font *otf = dynamic_cast<Open_type_font *> (fm->original_font ());
+
SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OTF font-metric");
- SCM_ASSERT_TYPE (scm_is_string (glyph), glyph, SCM_ARG1,
- __FUNCTION__, "string");
+ LY_ASSERT_TYPE(scm_is_string, glyph, 2);
SCM sym = scm_string_to_symbol (glyph);
return scm_hashq_ref (otf->get_char_table (), sym, SCM_EOL);
: dynamic_cast<Open_type_font *> (unsmob_metrics (font));
SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "Open type font");
- SCM_ASSERT_TYPE (scm_is_string (tag), tag, SCM_ARG1, __FUNCTION__, "Open type font");
+ LY_ASSERT_TYPE (scm_is_string, tag, 2);
char ctag [5] = " ";
: dynamic_cast<Open_type_font *> (unsmob_metrics (font));
- SCM_ASSERT_TYPE (otf,font, SCM_ARG1, __FUNCTION__, "OTF font");
+ SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OTF font");
return otf->glyph_list ();
}
*/
#include "text-interface.hh"
-#include "line-spanner.hh"
#include "spanner.hh"
#include "font-interface.hh"
#include "dimensions.hh"
#include "context-def.hh"
#include "lily-parser.hh"
-LY_DEFINE (ly_layout_lookup, "ly:output-def-lookup",
+LY_DEFINE (ly_output_def_lookup, "ly:output-def-lookup",
2, 1, 0, (SCM pap, SCM sym, SCM def),
- "Lookup @var{sym} in @var{pap}. "
+ "Lookup @var{sym} in the Output_def @var{pap}. "
"Return the value or @var{def} (which defaults to @code{'()}) if undefined.")
{
+ LY_ASSERT_SMOB (Output_def, pap, 1);
Output_def *op = unsmob_output_def (pap);
- SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Output_def");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+ LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
SCM answer = op->lookup_variable (sym);
if (answer == SCM_UNDEFINED)
1, 0, 0, (SCM def),
"Get the variable scope inside @var{def}.")
{
+ LY_ASSERT_SMOB (Output_def, def, 1);
Output_def *op = unsmob_output_def (def);
- SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
return op->scope_;
}
1, 0, 0, (SCM def),
"Get the parent output-def of @var{def}.")
{
+ LY_ASSERT_SMOB (Output_def, def, 1);
Output_def *op = unsmob_output_def (def);
- SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
return op->parent_ ? op->parent_->self_scm () : SCM_EOL;
}
1, 0, 0, (SCM def),
"Clone @var{def}.")
{
+ LY_ASSERT_SMOB (Output_def, def, 1);
Output_def *op = unsmob_output_def (def);
- SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
Output_def *clone = op->clone ();
return clone->unprotect ();
{
Output_def *id = unsmob_output_def (output_def);
- SCM al = ly_module2alist (id->scope_);
+ SCM al = ly_module_2_alist (id->scope_);
SCM ell = SCM_EOL;
for (SCM s = al; scm_is_pair (s); s = scm_cdr (s))
{
1, 0, 0, (SCM bp),
"Get output-scale for BP.")
{
+ LY_ASSERT_SMOB (Output_def, bp, 1);
Output_def *b = unsmob_output_def (bp);
- SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
return scm_from_double (output_scale (b));
}
"(An alist chain is a list of alists, "
"containing grob properties).\n")
{
- Output_def *paper = unsmob_output_def (paper_smob);
- SCM_ASSERT_TYPE (paper, paper_smob, SCM_ARG1,
- __FUNCTION__, "paper definition");
+ LY_ASSERT_SMOB (Output_def, paper_smob, 1);
+ Output_def *paper = unsmob_output_def (paper_smob);
Font_metric *fm = select_font (paper, chain);
return fm->self_scm ();
}
(SCM layout_smob, SCM name),
"Return the layout variable @var{name}.")
{
+
+ LY_ASSERT_SMOB (Output_def, layout_smob, 1);
Output_def *layout = unsmob_output_def (layout_smob);
- SCM_ASSERT_TYPE (layout, layout_smob, SCM_ARG1,
- __FUNCTION__, "layout definition");
return scm_from_double (layout->get_dimension (name));
}
(SCM bp),
"Return fonts from the @code{\\paper} block @var{bp}.")
{
+ LY_ASSERT_SMOB (Output_def, bp, 1);
Output_def *b = unsmob_output_def (bp);
- SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
-
SCM tab1 = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
SCM tab2 = b->lookup_variable (ly_symbol2scm ("pango-fonts"));
2, 0, 0, (SCM chain, SCM size),
"Make a PangoFontDescription string for the property alist @var{chain} at size @var{size}.")
{
- SCM_ASSERT_TYPE (scm_is_number (size), size, SCM_ARG1, __FUNCTION__, "number");
+ LY_ASSERT_TYPE (scm_is_number, size, 1);
PangoFontDescription *pfd = properties_to_pango_description (chain, scm_to_double (size));
char *str = pango_font_description_to_string (pfd);
1, 0, 0, (SCM pb),
"Return pages in book PB.")
{
+ LY_ASSERT_SMOB (Paper_book, pb, 1);
return unsmob_paper_book (pb)->pages ();
}
1, 0, 0, (SCM book),
"Return pages in layout book @var{book}.")
{
+ LY_ASSERT_SMOB (Paper_book, book, 1);
Paper_book *pb = unsmob_paper_book (book);
- SCM_ASSERT_TYPE (pb, book, SCM_ARG1, __FUNCTION__, "Paper_book");
SCM scopes = SCM_EOL;
if (ly_is_module (pb->header_))
1, 0, 0, (SCM paper_book),
"Return performances in book @var{paper-book}.")
{
+ LY_ASSERT_SMOB (Paper_book, paper_book, 1);
return unsmob_paper_book (paper_book)->performances ();
}
1, 0, 0, (SCM pb),
"Return systems in book PB.")
{
+ LY_ASSERT_SMOB (Paper_book, pb, 1);
return unsmob_paper_book (pb)->systems ();
}
1, 0, 0, (SCM pb),
"Return pages in book PB.")
{
+ LY_ASSERT_SMOB (Paper_book, pb, 1);
Paper_book *pbook = unsmob_paper_book (pb);
- SCM_ASSERT_TYPE(pbook, pb, SCM_ARG1, __FUNCTION__, "Paper_book");
return pbook->paper_->self_scm ();
}
"Create an outputter that evaluates within "
"@code{output-}@var{format}, writing to @var{port}.")
{
- SCM_ASSERT_TYPE (ly_is_port (port), port, SCM_ARG1, __FUNCTION__,
- "port");
- SCM_ASSERT_TYPE (scm_is_string (format), format, SCM_ARG2, __FUNCTION__,
- "String");
+ LY_ASSERT_TYPE (ly_is_port, port, 1);
+ LY_ASSERT_TYPE (scm_is_string, format, 2);
string f = ly_scm2string (format);
2, 0, 0, (SCM outputter, SCM stencil),
"Dump stencil @var{expr} onto @var{outputter}.")
{
+
+ LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
+ LY_ASSERT_SMOB(Stencil, stencil, 2);
+
Paper_outputter *po = unsmob_outputter (outputter);
Stencil *st = unsmob_stencil (stencil);
- SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
- SCM_ASSERT_TYPE (st, stencil, SCM_ARG1, __FUNCTION__, "Paper_outputter");
+
po->output_stencil (*st);
return SCM_UNSPECIFIED;
}
2, 0, 0, (SCM outputter, SCM str),
"Dump @var{str} onto @var{outputter}.")
{
+ LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
+ LY_ASSERT_TYPE(scm_is_string, str, 2);
+
Paper_outputter *po = unsmob_outputter (outputter);
- SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
- SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "Paper_outputter");
return po->dump_string (str);
}
1, 0, 0, (SCM outputter),
"Return output port for @var{outputter}.")
{
+ LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
Paper_outputter *po = unsmob_outputter (outputter);
- SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
return po->file ();
}
1, 0, 0, (SCM outputter),
"Close port of @var{outputter}.")
{
+ LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
Paper_outputter *po = unsmob_outputter (outputter);
- SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
po->close ();
return SCM_UNSPECIFIED;
2, 0, 0, (SCM outputter, SCM expr),
"Eval @var{expr} in module of @var{outputter}.")
{
+ LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
Paper_outputter *po = unsmob_outputter (outputter);
- SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
po->output_scheme (expr);
(SCM paper_score),
"Return vector of paper_system objects from @var{paper-score}.")
{
- Paper_score *pscore = dynamic_cast<Paper_score *> (unsmob_music_output (paper_score));
- SCM_ASSERT_TYPE (pscore, paper_score, SCM_ARG1, __FUNCTION__, "Paper score (Music output)");
+ LY_ASSERT_TYPE (unsmob_paper_score, paper_score, 1);
+ Paper_score *pscore = dynamic_cast<Paper_score *> (unsmob_music_output (paper_score));
return pscore->get_paper_systems ();
}
return paper_systems_;
}
+
+Paper_score *
+unsmob_paper_score (SCM x)
+{
+ return dynamic_cast<Paper_score*> (unsmob_music_output (x));
+}
2, 0, 0, (SCM performance, SCM filename),
"Write @var{performance} to @var{filename}")
{
- Performance *perf = dynamic_cast<Performance *> (unsmob_music_output (performance));
+ LY_ASSERT_TYPE (unsmob_performance, performance, 1);
+ LY_ASSERT_TYPE(scm_is_string, filename, 2);
- SCM_ASSERT_TYPE (perf, performance, SCM_ARG1, __FUNCTION__, "Performance");
- SCM_ASSERT_TYPE (scm_is_string (filename), filename, SCM_ARG2, __FUNCTION__, "file name");
-
- perf->write_output (ly_scm2string (filename));
+ unsmob_performance (performance)->write_output (ly_scm2string (filename));
return SCM_UNSPECIFIED;
}
Performance::process ()
{
}
+
+Performance *
+unsmob_performance (SCM x)
+{
+ return dynamic_cast<Performance*> (unsmob_music_output (x));
+}
--- /dev/null
+
+#include "program-option.hh"
+#include "source-file.hh"
+#include "memory-stream.hh"
+#include "open-type-font.hh"
+#include "main.hh"
+#include "warn.hh"
+
+LY_DEFINE (ly_pfb_2_pfa, "ly:pfb->pfa",
+ 1, 0, 0, (SCM pfb_file_name),
+ "Convert the contents of a PFB file to PFA.")
+{
+ LY_ASSERT_TYPE (scm_is_string, pfb_file_name, 1);
+
+ string file_name = ly_scm2string (pfb_file_name);
+
+ if (be_verbose_global)
+ progress_indication ("[" + file_name);
+
+ vector<char> pfb_string = gulp_file (file_name, 0);
+ char *pfa = pfb2pfa ((Byte *) &pfb_string[0], pfb_string.size ());
+
+ SCM pfa_scm = scm_from_locale_string (pfa);
+ free (pfa);
+
+ if (be_verbose_global)
+ progress_indication ("]");
+
+ return pfa_scm;
+}
+
+LY_DEFINE (ly_otf_2_cff, "ly:otf->cff",
+ 1, 0, 0, (SCM otf_file_name),
+ "Convert the contents of a OTF file to CFF file, returning it as "
+ " a string.")
+{
+ LY_ASSERT_TYPE (scm_is_string, otf_file_name, 1);
+
+ string file_name = ly_scm2string (otf_file_name);
+ if (be_verbose_global)
+ progress_indication ("[" + file_name);
+
+ FT_Face face = open_ft_face (file_name);
+ string table = get_otf_table (face, "CFF ");
+
+ SCM asscm = scm_from_locale_stringn ((char *) table.data (),
+ table.length ());
+
+ if (be_verbose_global)
+ progress_indication ("]");
+
+ return asscm;
+}
return out;
}
-LY_DEFINE (ly_pfb_to_pfa, "ly:pfb->pfa",
- 1, 0, 0, (SCM pfb_file_name),
- "Convert the contents of a PFB file to PFA.")
-{
- SCM_ASSERT_TYPE (scm_is_string (pfb_file_name), pfb_file_name,
- SCM_ARG1, __FUNCTION__, "string");
-
- string file_name = ly_scm2string (pfb_file_name);
-
- if (be_verbose_global)
- progress_indication ("[" + file_name);
-
- vector<char> pfb_string = gulp_file (file_name, 0);
- char *pfa = pfb2pfa ((Byte *) &pfb_string[0], pfb_string.size ());
-
- SCM pfa_scm = scm_from_locale_string (pfa);
- free (pfa);
-
- if (be_verbose_global)
- progress_indication ("]");
-
- return pfa_scm;
-}
-
-LY_DEFINE (ly_otf_to_cff, "ly:otf->cff",
- 1, 0, 0, (SCM otf_file_name),
- "Convert the contents of a OTF file to CFF file, returning it as "
- " a string.")
-{
- SCM_ASSERT_TYPE (scm_is_string (otf_file_name), otf_file_name,
- SCM_ARG1, __FUNCTION__, "string");
-
- string file_name = ly_scm2string (otf_file_name);
- if (be_verbose_global)
- progress_indication ("[" + file_name);
-
- FT_Face face = open_ft_face (file_name);
- string table = get_otf_table (face, "CFF ");
-
- SCM asscm = scm_from_locale_stringn ((char *) table.data (),
- table.length ());
-
- if (be_verbose_global)
- progress_indication ("]");
-
- return asscm;
-}
-
"Transpose @var{p} by the amount @var{delta}, "
"where @var{delta} is relative to middle C.")
{
+ LY_ASSERT_SMOB (Pitch, p, 1);
+ LY_ASSERT_SMOB (Pitch, delta, 2);
+
Pitch *t = unsmob_pitch (p);
Pitch *d = unsmob_pitch (delta);
- SCM_ASSERT_TYPE (t, p, SCM_ARG1, __FUNCTION__, "pitch");
- SCM_ASSERT_TYPE (d, delta, SCM_ARG1, __FUNCTION__, "pitch");
return t->transposed (*d).smobbed_copy ();
}
"with 0 corresponding to C and 6 corresponding to B. "
"The @var{alter} is a rational number of whole tones for alteration.")
{
- SCM_ASSERT_TYPE (scm_is_integer (octave), octave, SCM_ARG1, __FUNCTION__, "integer");
- SCM_ASSERT_TYPE (scm_is_integer (note), note, SCM_ARG2, __FUNCTION__, "integer");
- SCM_ASSERT_TYPE (scm_is_rational (alter),
- alter, SCM_ARG3, __FUNCTION__, "rational");
+ LY_ASSERT_TYPE (scm_is_integer, octave, 1);
+ LY_ASSERT_TYPE(scm_is_integer, note, 2);
+ LY_ASSERT_TYPE(scm_is_rational, alter, 3);
Pitch p (scm_to_int (octave), scm_to_int (note),
ly_scm2rational (alter));
(SCM p),
"Negate @var{p}.")
{
+ LY_ASSERT_SMOB (Pitch, p, 1);
Pitch *pp = unsmob_pitch (p);
- SCM_ASSERT_TYPE (pp, p, SCM_ARG1, __FUNCTION__, "Pitch");
return pp->negated ().smobbed_copy ();
}
(SCM p),
"Number of steps counted from middle C of the pitch @var{p}.")
{
+ LY_ASSERT_SMOB (Pitch, p, 1);
Pitch *pp = unsmob_pitch (p);
- SCM_ASSERT_TYPE (pp, p, SCM_ARG1, __FUNCTION__, "Pitch");
return scm_from_int (pp->steps ());
}
1, 0, 0, (SCM pp),
"Extract the octave from pitch @var{p}.")
{
+ LY_ASSERT_SMOB (Pitch, pp, 1);
Pitch *p = unsmob_pitch (pp);
- SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->get_octave ();
return scm_from_int (q);
}
1, 0, 0, (SCM pp),
"Extract the alteration from pitch @var{p}.")
{
+ LY_ASSERT_SMOB (Pitch, pp, 1);
Pitch *p = unsmob_pitch (pp);
- SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
Rational q = p->get_alteration ();
return ly_rational2scm (q);
1, 0, 0, (SCM pp),
"Extract the note name from pitch @var{pp}.")
{
+ LY_ASSERT_SMOB (Pitch, pp, 1);
Pitch *p = unsmob_pitch (pp);
- SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->get_notename ();
return scm_from_int (q);
}
1, 0, 0, (SCM pp),
"Calculate the number of quarter tones of @var{p} from middle C.")
{
+ LY_ASSERT_SMOB (Pitch, pp, 1);
Pitch *p = unsmob_pitch (pp);
- SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->rounded_quartertone_pitch ();
return scm_from_int (q);
}
1, 0, 0, (SCM pp),
"calculate the number of semitones of @var{p} from middle C.")
{
+ LY_ASSERT_SMOB (Pitch, pp, 1);
Pitch *p = unsmob_pitch (pp);
- SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->rounded_semitone_pitch ();
return scm_from_int (q);
}
2, 0, 0, (SCM p1, SCM p2),
"Is @var{p1} lexicographically smaller than @var{p2}?")
{
+ LY_ASSERT_SMOB (Pitch, p1, 1);
+ LY_ASSERT_SMOB (Pitch, p2, 2);
+
Pitch *a = unsmob_pitch (p1);
Pitch *b = unsmob_pitch (p2);
- SCM_ASSERT_TYPE (a, p1, SCM_ARG1, __FUNCTION__, "Pitch");
- SCM_ASSERT_TYPE (b, p2, SCM_ARG2, __FUNCTION__, "Pitch");
-
if (Pitch::compare (*a, *b) < 0)
return SCM_BOOL_T;
else
"Return pitch @var{delta} such that @code{pitch} transposed by "
"@var{delta} equals @var{root}")
{
+
+ LY_ASSERT_SMOB (Pitch, pitch, 1);
+ LY_ASSERT_SMOB (Pitch, root, 2);
+
Pitch *p = unsmob_pitch (pitch);
Pitch *r = unsmob_pitch (root);
- SCM_ASSERT_TYPE (p, pitch, SCM_ARG1, __FUNCTION__, "Pitch");
- SCM_ASSERT_TYPE (r, root, SCM_ARG2, __FUNCTION__, "Pitch");
return pitch_interval (*r, *p).smobbed_copy ();
}
protected:
DECLARE_ACKNOWLEDGER (note_head);
DECLARE_ACKNOWLEDGER (dots);
- DECLARE_ACKNOWLEDGER (text_spanner);
- void process_music ();
+ DECLARE_ACKNOWLEDGER (trill_spanner);
void stop_translation_timestep ();
private:
}
void
-Pitched_trill_engraver::acknowledge_text_spanner (Grob_info info)
+Pitched_trill_engraver::acknowledge_trill_spanner (Grob_info info)
{
Stream_event *ev = info.event_cause ();
if (ev
trill_accidental_ = 0;
}
-void
-Pitched_trill_engraver::process_music ()
-{
-}
-
#include "translator.icc"
ADD_ACKNOWLEDGER (Pitched_trill_engraver, note_head);
ADD_ACKNOWLEDGER (Pitched_trill_engraver, dots);
-ADD_ACKNOWLEDGER (Pitched_trill_engraver, text_spanner);
+ADD_ACKNOWLEDGER (Pitched_trill_engraver, trill_spanner);
ADD_TRANSLATOR (Pitched_trill_engraver,
/* doc */
2, 1, 0, (SCM obj, SCM sym, SCM value),
"Set property @var{sym} of @var{obj} to @var{value}")
{
+ LY_ASSERT_SMOB (Prob, obj, 1);
Prob *ps = unsmob_prob (obj);
- SCM_ASSERT_TYPE (ps, obj, SCM_ARG1, __FUNCTION__, "Prob");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+ LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
ps->set_property (sym, value);
return SCM_UNSPECIFIED;
/*
Hmm, this is not orthogonal.
- */
+*/
LY_DEFINE (ly_prob_property_p, "ly:prob-property?",
2, 1, 0, (SCM obj, SCM sym),
"Is boolean prop @var{sym} set?")
2, 1, 0, (SCM obj, SCM sym, SCM dfault),
"Return the value for @var{sym}.")
{
+ LY_ASSERT_SMOB (Prob, obj, 1);
Prob *ps = unsmob_prob (obj);
- SCM_ASSERT_TYPE (ps, obj, SCM_ARG1, __FUNCTION__, "Prob");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+ LY_ASSERT_TYPE (ly_is_symbol,sym, 2);
if (dfault == SCM_UNDEFINED)
dfault = SCM_EOL;
--- /dev/null
+/*
+ program-option-scheme.cc -- implement option setting from Scheme
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2001--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
+
+#include "program-option.hh"
+
+#include <cstdio>
+#include <cstring>
+using namespace std;
+
+#include "profile.hh"
+#include "international.hh"
+#include "main.hh"
+#include "parse-scm.hh"
+#include "string-convert.hh"
+#include "warn.hh"
+
+bool debug_skylines;
+
+/*
+ Backwards compatibility.
+*/
+bool lily_1_8_relative = false;
+bool lily_1_8_compatibility_used = false;
+bool profile_property_accesses = false;
+/*
+ crash if internally the wrong type is used for a grob property.
+*/
+bool do_internal_type_checking_global;
+bool strict_infinity_checking = false;
+
+static SCM option_hash;
+
+void internal_set_option (SCM var, SCM val)
+{
+ scm_hashq_set_x (option_hash, var, val);
+
+ if (0)
+ ;
+ else if (var == ly_symbol2scm ("profile-property-accesses"))
+ {
+ profile_property_accesses = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+ else if (var == ly_symbol2scm ("point-and-click"))
+ {
+ point_and_click_global = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+ else if (var == ly_symbol2scm ("protected-scheme-parsing"))
+ {
+ parse_protect_global = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+ else if (var == ly_symbol2scm ("check-internal-types"))
+ {
+ do_internal_type_checking_global = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+ else if (var == ly_symbol2scm ("debug-gc-assert-parsed-dead"))
+ {
+ parsed_objects_should_be_dead = to_boolean (val);
+ val = scm_from_bool (parsed_objects_should_be_dead);
+ }
+ else if (var == ly_symbol2scm ("safe"))
+ {
+ be_safe_global = to_boolean (val);
+ val = scm_from_bool (be_safe_global);
+ }
+ else if (var == ly_symbol2scm ("old-relative"))
+ {
+ lily_1_8_relative = to_boolean (val);
+ /* Needs to be reset for each file that uses this option. */
+ lily_1_8_compatibility_used = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+ else if (var == ly_symbol2scm ("strict-infinity-checking"))
+ {
+ strict_infinity_checking = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+ else if (var == ly_symbol2scm ("debug-skylines"))
+ {
+ debug_skylines = to_boolean (val);
+ val = scm_from_bool (to_boolean (val));
+ }
+}
+
+
+
+
+bool
+get_program_option (const char *s)
+{
+ SCM sym = ly_symbol2scm (s);
+
+ return to_boolean (ly_get_option (sym));
+}
+
+
+ssize const HELP_INDENT = 30;
+ssize const INDENT = 2;
+ssize const SEPARATION = 5;
+
+/*
+ Hmmm. should do in SCM / C++ ?
+*/
+static string
+get_help_string ()
+{
+ SCM alist = ly_hash2alist (option_hash);
+ SCM convertor = ly_lily_module_constant ("scm->string");
+
+ vector<string> opts;
+
+ for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
+ {
+ SCM sym = scm_caar (s);
+ SCM val = scm_cdar (s);
+ string opt_spec
+ = String_convert::char_string (' ', INDENT)
+ + ly_symbol2string (sym)
+ + " ("
+ + ly_scm2string (scm_call_1 (convertor, val))
+ + ")";
+
+ if (opt_spec.length () + SEPARATION > HELP_INDENT)
+ {
+ opt_spec += "\n"
+ + String_convert::char_string (' ', HELP_INDENT);
+ }
+ else
+ opt_spec += String_convert::char_string (' ', HELP_INDENT - opt_spec.length ());
+
+ SCM opt_help_scm
+ = scm_object_property (sym, ly_symbol2scm ("program-option-documentation"));
+ string opt_help = ly_scm2string (opt_help_scm);
+ replace_all (opt_help,
+ string ("\n"),
+ string ("\n")
+ + String_convert::char_string (' ', HELP_INDENT));
+
+ opts.push_back (opt_spec + opt_help + "\n");
+ }
+
+ string help ("Options supported by ly:set-option\n\n");
+ vector_sort (opts, less<string> ());
+ for (vsize i = 0; i < opts.size (); i++)
+ help += opts[i];
+
+ help += string ("\n");
+ return help;
+}
+
+
+LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
+ "Print @code{ly:set-option} usage")
+{
+ string help = get_help_string ();
+ progress_indication (help);
+
+ return SCM_UNSPECIFIED;
+}
+
+LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
+ (SCM sym, SCM val, SCM description),
+ "Add a program option @var{sym} with default @var{val}.")
+{
+ if (!option_hash)
+ {
+ option_hash = scm_permanent_object (scm_c_make_hash_table (11));
+ }
+ LY_ASSERT_TYPE (ly_is_symbol, sym, 1);
+ LY_ASSERT_TYPE (scm_is_string, description, 3);
+
+ internal_set_option (sym, val);
+
+ scm_set_object_property_x (sym, ly_symbol2scm ("program-option-documentation"),
+ description);
+
+ return SCM_UNSPECIFIED;
+}
+
+LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
+ "Set a program option.")
+{
+ LY_ASSERT_TYPE (ly_is_symbol, var, 1);
+
+ if (val == SCM_UNDEFINED)
+ val = SCM_BOOL_T;
+
+ string varstr = ly_scm2string (scm_symbol_to_string (var));
+ if (varstr.substr (0, 3) == string ("no-"))
+ {
+ var = ly_symbol2scm (varstr.substr (3, varstr.length () -3).c_str ());
+ val = scm_from_bool (!to_boolean (val));
+ }
+
+ SCM handle = scm_hashq_get_handle (option_hash, var);
+ if (handle == SCM_BOOL_F)
+ warning (_f ("no such internal option: %s", varstr.c_str ()));
+
+ internal_set_option (var, val);
+ return SCM_UNSPECIFIED;
+}
+
+LY_DEFINE (ly_command_line_options, "ly:command-line-options", 0, 0, 0, (),
+ "The Scheme specified on command-line with @samp{-d}.")
+{
+ return ly_string2scm (init_scheme_variables_global);
+}
+
+LY_DEFINE (ly_command_line_code, "ly:command-line-code", 0, 0, 0, (),
+ "The Scheme specified on command-line with @samp{-e}.")
+{
+ return ly_string2scm (init_scheme_code_global);
+}
+
+LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (),
+ "Was be_verbose_global set?")
+{
+ return scm_from_bool (be_verbose_global);
+}
+
+
+
+LY_DEFINE (ly_all_options, "ly:all-options",
+ 0, 0, 0, (),
+ "Get all option settings in an alist.")
+{
+ return ly_hash2alist (option_hash);
+}
+
+
+LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
+ "Get a global option setting.")
+{
+ LY_ASSERT_TYPE (ly_is_symbol, var, 1);
+ return scm_hashq_ref (option_hash, var, SCM_BOOL_F);
+}
-/*
- scm-option.cc -- implement option setting from Scheme
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2001--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#include "program-option.hh"
-
-#include <cstdio>
-#include <cstring>
-using namespace std;
-
-#include "profile.hh"
-#include "international.hh"
-#include "main.hh"
-#include "parse-scm.hh"
-#include "string-convert.hh"
-#include "warn.hh"
-
-bool debug_skylines;
-
-/*
- Backwards compatibility.
-*/
-bool lily_1_8_relative = false;
-bool lily_1_8_compatibility_used = false;
-bool profile_property_accesses = false;
-/*
- crash if internally the wrong type is used for a grob property.
-*/
-bool do_internal_type_checking_global;
-bool strict_infinity_checking = false;
-
-static SCM option_hash;
-
-void internal_set_option (SCM var, SCM val)
-{
- scm_hashq_set_x (option_hash, var, val);
-
- if (0)
- ;
- else if (var == ly_symbol2scm ("profile-property-accesses"))
- {
- profile_property_accesses = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("point-and-click"))
- {
- point_and_click_global = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("protected-scheme-parsing"))
- {
- parse_protect_global = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("check-internal-types"))
- {
- do_internal_type_checking_global = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("debug-gc-assert-parsed-dead"))
- {
- parsed_objects_should_be_dead = to_boolean (val);
- val = scm_from_bool (parsed_objects_should_be_dead);
- }
- else if (var == ly_symbol2scm ("safe"))
- {
- be_safe_global = to_boolean (val);
- val = scm_from_bool (be_safe_global);
- }
- else if (var == ly_symbol2scm ("old-relative"))
- {
- lily_1_8_relative = to_boolean (val);
- /* Needs to be reset for each file that uses this option. */
- lily_1_8_compatibility_used = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("strict-infinity-checking"))
- {
- strict_infinity_checking = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("debug-skylines"))
- {
- debug_skylines = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
-}
-
-ssize const HELP_INDENT = 30;
-ssize const INDENT = 2;
-ssize const SEPARATION = 5;
-
-/*
- Hmmm. should do in SCM / C++ ?
-*/
-static string
-get_help_string ()
-{
- SCM alist = ly_hash2alist (option_hash);
- SCM convertor = ly_lily_module_constant ("scm->string");
-
- vector<string> opts;
-
- for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
- {
- SCM sym = scm_caar (s);
- SCM val = scm_cdar (s);
- string opt_spec
- = String_convert::char_string (' ', INDENT)
- + ly_symbol2string (sym)
- + " ("
- + ly_scm2string (scm_call_1 (convertor, val))
- + ")";
-
- if (opt_spec.length () + SEPARATION > HELP_INDENT)
- {
- opt_spec += "\n"
- + String_convert::char_string (' ', HELP_INDENT);
- }
- else
- opt_spec += String_convert::char_string (' ', HELP_INDENT - opt_spec.length ());
-
- SCM opt_help_scm
- = scm_object_property (sym, ly_symbol2scm ("program-option-documentation"));
- string opt_help = ly_scm2string (opt_help_scm);
- replace_all (opt_help,
- string ("\n"),
- string ("\n")
- + String_convert::char_string (' ', HELP_INDENT));
-
- opts.push_back (opt_spec + opt_help + "\n");
- }
-
- string help ("Options supported by ly:set-option\n\n");
- vector_sort (opts, less<string> ());
- for (vsize i = 0; i < opts.size (); i++)
- help += opts[i];
-
- help += string ("\n");
- return help;
-}
-
-LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
- "Print @code{ly:set-option} usage")
-{
- string help = get_help_string ();
- progress_indication (help);
-
- return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
- (SCM sym, SCM val, SCM description),
- "Add a program option @var{sym} with default @var{val}.")
-{
- if (!option_hash)
- {
- option_hash = scm_permanent_object (scm_c_make_hash_table (11));
- }
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG1, __FUNCTION__, "symbol");
- SCM_ASSERT_TYPE (scm_is_string (description), description,
- SCM_ARG3, __FUNCTION__, "string");
-
- internal_set_option (sym, val);
-
- scm_set_object_property_x (sym, ly_symbol2scm ("program-option-documentation"),
- description);
-
- return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
- "Set a program option. Try setting 'help for a help string.")
-{
- SCM_ASSERT_TYPE (scm_is_symbol (var), var, SCM_ARG1,
- __FUNCTION__, "symbol");
-
- if (ly_symbol2scm ("help") == var)
- {
- ly_option_usage ();
- exit (0);
- }
-
- if (val == SCM_UNDEFINED)
- val = SCM_BOOL_T;
-
- string varstr = ly_scm2string (scm_symbol_to_string (var));
- if (varstr.substr (0, 3) == string ("no-"))
- {
- var = ly_symbol2scm (varstr.substr (3, varstr.length () -3).c_str ());
- val = scm_from_bool (!to_boolean (val));
- }
-
- SCM handle = scm_hashq_get_handle (option_hash, var);
- if (handle == SCM_BOOL_F)
- warning (_f ("no such internal option: %s", varstr.c_str ()));
-
- internal_set_option (var, val);
- return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_command_line_options, "ly:command-line-options", 0, 0, 0, (),
- "The Scheme specified on command-line with @samp{-d}.")
-{
- return ly_string2scm (init_scheme_variables_global);
-}
-
-LY_DEFINE (ly_command_line_code, "ly:command-line-code", 0, 0, 0, (),
- "The Scheme specified on command-line with @samp{-e}.")
-{
- return ly_string2scm (init_scheme_code_global);
-}
-
-LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (),
- "Was be_verbose_global set?")
-{
- return scm_from_bool (be_verbose_global);
-}
-
-
-
-LY_DEFINE (ly_all_option, "ly:all-options",
- 0, 0, 0, (),
- "Get all option settings in an alist.")
-{
- return ly_hash2alist (option_hash);
-}
-
-
-LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
- "Get a global option setting.")
-{
- SCM_ASSERT_TYPE (scm_is_symbol (var), var,
- SCM_ARG1, __FUNCTION__, "symbol");
- return scm_hashq_ref (option_hash, var, SCM_BOOL_F);
-}
-
-
-
-bool
-get_program_option (const char *s)
-{
- SCM sym = ly_symbol2scm (s);
-
- return to_boolean (ly_get_option (sym));
-}
return scm_from_double (0.0);
}
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Rest_collision, force_shift_callback_rest, 2, 1);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Rest_collision, force_shift_callback_rest, 2, 1, "");
SCM
Rest_collision::force_shift_callback_rest (SCM rest, SCM offset)
{
Rest_collision::calc_positioning_done (SCM smob)
{
Grob *me = unsmob_grob (smob);
+
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
extract_grob_set (me, "elements", elts);
vector<Grob*> rests;
1, 0, 0, (SCM scale),
"Set the global default scale.")
{
- Scale *s = Scale::unsmob (scale);
- SCM_ASSERT_TYPE (s, scale, SCM_ARG1, __FUNCTION__, "scale");
+ LY_ASSERT_SMOB (Scale, scale, 1);
+ Scale *s = Scale::unsmob (scale);
if (default_global_scale)
default_global_scale->unprotect ();
default_global_scale = s;
"\n"
" @var{callback} should take exactly one argument." )
{
- SCM_ASSERT_TYPE (ly_is_procedure (callback), callback, SCM_ARG1, __FUNCTION__, "procedure");
+ LY_ASSERT_TYPE (ly_is_procedure, callback, 1);
Scheme_listener *l = new Scheme_listener (callback);
SCM listener = GET_LISTENER (l->call).smobbed_copy ();
l->unprotect ();
(SCM music),
"Return score with @var{music} encapsulated in @var{score}.")
{
+ LY_ASSERT_SMOB (Music, music, 1);
Music *mus = unsmob_music (music);
- SCM_ASSERT_TYPE (mus, music, SCM_ARG1, __FUNCTION__, "music");
Score *score = new Score;
score->set_music (music);
1, 0, 0, (SCM score),
"All output defs in a score.")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
SCM l = SCM_EOL;
for (vsize i = 0; i < sc->defs_.size (); i++)
1, 0, 0, (SCM score),
"return score header.")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
return sc->header_;
}
1, 0, 0, (SCM score),
"return score music.")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
return sc->get_music ();
}
1, 0, 0, (SCM score),
"Was there an error in the score?")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
return scm_from_bool (sc->error_found_);
}
"return a list of layout-lines. "
"\nTake optional Object_key argument.")
{
+ LY_ASSERT_SMOB (Score, score, 1);
+ LY_ASSERT_SMOB (Output_def, layout, 2);
+
Score *sc = unsmob_score (score);
Output_def *od = unsmob_output_def (layout);
if (sc->error_found_)
return SCM_EOL;
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "Score");
- SCM_ASSERT_TYPE (od, layout, SCM_ARG2, __FUNCTION__, "Output_def");
-
Output_def *score_def = 0;
/* UGR, FIXME, these are default \layout blocks once again. They
*/
#include "self-alignment-interface.hh"
+
#include "warn.hh"
+#include "paper-column.hh"
#include "grob.hh"
MAKE_SCHEME_CALLBACK (Self_alignment_interface, y_aligned_on_self, 1);
Self_alignment_interface::aligned_on_parent (Grob *me, Axis a)
{
Grob *him = me->get_parent (a);
+ if (Paper_column::has_interface (him))
+ return scm_from_double (0.0);
+
Interval he = him->extent (him, a);
SCM sym = (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X")
Semi_tie_column::calc_positioning_done (SCM smob)
{
Grob *me = unsmob_grob (smob);
-
+
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
extract_grob_set (me, "ties", lv_ro_ties);
vector<Grob*> lv_ties (lv_ro_ties);
}
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Side_position_interface, x_aligned_side, 2, 1);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Side_position_interface, x_aligned_side, 2, 1, "");
SCM
Side_position_interface::x_aligned_side (SCM smob, SCM current_off)
{
return axis_aligned_side_helper (smob, X_AXIS, false, 0, 0, current_off);
}
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Side_position_interface, y_aligned_side, 2, 1);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Side_position_interface, y_aligned_side, 2, 1, "");
SCM
Side_position_interface::y_aligned_side (SCM smob, SCM current_off)
{
return axis_aligned_side_helper (smob, Y_AXIS, false, 0, 0, current_off);
}
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Side_position_interface, pure_y_aligned_side, 4, 1);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Side_position_interface, pure_y_aligned_side, 4, 1, "");
SCM
Side_position_interface::pure_y_aligned_side (SCM smob, SCM start, SCM end, SCM cur_off)
{
return scm_list_2 (scm_from_double (0.0), scm_from_double (0.0));
SCM_ASSERT_TYPE (len >= 0, springs, SCM_ARG1, __FUNCTION__, "list of springs");
- SCM_ASSERT_TYPE (scm_ilength (rods) >= 0, rods, SCM_ARG2, __FUNCTION__, "list of rods");
- SCM_ASSERT_TYPE (scm_is_number (length) || length == SCM_BOOL_F,
- length, SCM_ARG3, __FUNCTION__, "number or #f");
+ SCM_ASSERT_TYPE (scm_ilength (rods) > 0, rods, SCM_ARG1, __FUNCTION__, "list of rods");
+ LY_ASSERT_TYPE(scm_is_number, length, 3);
bool is_ragged = ragged == SCM_BOOL_T;
Simple_spacer spacer;
Pointer_group_interface::add_grob (me, ly_symbol2scm ("encompass-objects"), n);
}
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, pure_outside_slur_callback, 4, 1);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, pure_outside_slur_callback, 4, 1, "");
SCM
Slur::pure_outside_slur_callback (SCM grob, SCM start_scm, SCM end_scm, SCM offset_scm)
{
return scm_from_double (offset + dir * slur->pure_height (slur, start, end).length () / 4);
}
-MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, outside_slur_callback, 2, 1);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, outside_slur_callback, 2, 1, "");
SCM
Slur::outside_slur_callback (SCM grob, SCM offset_scm)
{
#include "spanner.hh"
#include "item.hh"
-LY_DEFINE (ly_spanner_get_bound, "ly:spanner-bound",
+LY_DEFINE (ly_spanner_bound, "ly:spanner-bound",
2, 0, 0, (SCM slur, SCM dir),
"Get one of the bounds of @var{spanner}. @var{dir} is @code{-1} "
"for left, and @code{1} for right.")
{
- Spanner *sl = dynamic_cast<Spanner *> (unsmob_grob (slur));
- SCM_ASSERT_TYPE (sl, slur, SCM_ARG1, __FUNCTION__, "spanner grob");
- SCM_ASSERT_TYPE (is_direction (dir), slur, SCM_ARG2, __FUNCTION__, "dir");
- return sl->get_bound (to_dir (dir))->self_scm ();
+ LY_ASSERT_TYPE (unsmob_spanner, slur, 1);
+ LY_ASSERT_TYPE(is_direction, dir,2);
+
+ return unsmob_spanner (slur)->get_bound (to_dir (dir))->self_scm ();
}
/* TODO: maybe we should return a vector -- random access is more
1, 0, 0, (SCM spanner),
"Return broken-into list for @var{spanner}.")
{
+ LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (spanner));
- SCM_ASSERT_TYPE (me, spanner, SCM_ARG1, __FUNCTION__, "spanner");
SCM s = SCM_EOL;
for (vsize i = me->broken_intos_.size (); i--;)
1, 0, 0, (SCM sg),
"Return the Y-position of @var{sg} relative to the staff.")
{
+ LY_ASSERT_SMOB (Grob, sg, 1);
Grob *g = unsmob_grob (sg);
-
- SCM_ASSERT_TYPE (g, sg, SCM_ARG1, __FUNCTION__, "grob");
Real pos = Staff_symbol_referencer::get_position (g);
if (fabs (rint (pos) -pos) < 1e-6) // ugh.
if (!head_count (me))
return SCM_BOOL_T;
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
extract_grob_set (me, "note-heads", ro_heads);
vector<Grob*> heads (ro_heads);
vector_sort (heads, position_less);
Stem::height (SCM smob)
{
Grob *me = unsmob_grob (smob);
-
+ if (!is_normal_stem (me))
+ return ly_interval2scm (Interval ());
+
Direction dir = get_grob_direction (me);
- /* Trigger callback.
-
- UGH. Should be automatic
- */
Grob *beam = get_beam (me);
if (beam)
{
Real height_of_my_trem = 0.0;
Grob *trem = unsmob_grob (me->get_object ("tremolo-flag"));
if (trem)
- height_of_my_trem = trem->extent (trem, Y_AXIS).length ()
+ {
+ height_of_my_trem
+ = Stem_tremolo::vertical_length (trem)
/* hack a bit of space around the trem. */
+ beam_translation;
+ }
+
/* UGH
It seems that also for ideal minimum length, we must use
the maximum beam count (for this direction):
TODO: naming add/combine.
*/
-LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis",
+LY_DEFINE (ly_stencil_translate_axis, "ly:stencil-translate-axis",
3, 0, 0, (SCM stil, SCM amount, SCM axis),
"Return a copy of @var{stil} but translated by @var{amount} in @var{axis} direction.")
{
Stencil *s = unsmob_stencil (stil);
- SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
- SCM_ASSERT_TYPE (scm_is_number (amount), amount, SCM_ARG2, __FUNCTION__, "number");
+ LY_ASSERT_SMOB (Stencil, stil, 1);
+ LY_ASSERT_TYPE(scm_is_number,amount, 2);
+ LY_ASSERT_TYPE(is_axis,axis, 3);
Real real_amount = scm_to_double (amount);
-#if 0
- SCM_ASSERT_TYPE (!isinf (real_amount) && !isnan (real_amount),
- amount, SCM_ARG2, __FUNCTION__, "finite number");
-#endif
-
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
-
SCM new_s = s->smobbed_copy ();
Stencil *q = unsmob_stencil (new_s);
q->translate_axis (real_amount, Axis (scm_to_int (axis)));
return new_s;
}
-LY_DEFINE (ly_translate_stencil, "ly:stencil-translate",
+LY_DEFINE (ly_stencil_translate, "ly:stencil-translate",
2, 0, 0, (SCM stil, SCM offset),
"Return a @var{stil}, "
"but translated by @var{offset} (a pair of numbers).")
{
Stencil *s = unsmob_stencil (stil);
- SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
- SCM_ASSERT_TYPE (is_number_pair (offset), offset, SCM_ARG2, __FUNCTION__, "number pair");
+ LY_ASSERT_SMOB (Stencil, stil, 1);
+ LY_ASSERT_TYPE(is_number_pair, offset, 2);
Offset o = ly_scm2offset (offset);
SCM new_s = s->smobbed_copy ();
"Return the expression of @var{stil}.")
{
Stencil *s = unsmob_stencil (stil);
- SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
+ LY_ASSERT_SMOB (Stencil, stil, 1);
return s->expr ();
}
"@var{axis} direction (0 or 1 for x and y axis respectively).")
{
Stencil *s = unsmob_stencil (stil);
- SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
+ LY_ASSERT_SMOB (Stencil, stil, 1);
+ LY_ASSERT_TYPE(is_axis, axis, 2);
return ly_interval2scm (s->extent (Axis (scm_to_int (axis))));
}
"Return whether @var{stil} is empty ")
{
Stencil *s = unsmob_stencil (stil);
- SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
+ LY_ASSERT_SMOB (Stencil, stil, 1);
return scm_from_bool (s->is_empty ());
}
first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()");
SCM_ASSERT_TYPE (s2 || second == SCM_BOOL_F || second == SCM_EOL,
second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
- SCM_ASSERT_TYPE (is_direction (direction), direction, SCM_ARG3, __FUNCTION__, "dir");
+ LY_ASSERT_TYPE(is_axis, axis, 2);
+ LY_ASSERT_TYPE(is_direction, direction, 3);
Real p = 0.0;
if (padding != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_number (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+ LY_ASSERT_TYPE(scm_is_number, padding, 5);
p = scm_to_double (padding);
}
Real m = 0.0;
if (minimum != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (scm_is_number (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+ LY_ASSERT_TYPE(scm_is_number, minimum, 6);
m = scm_to_double (minimum);
}
Interval x;
if (xext != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
+ LY_ASSERT_TYPE(is_number_pair, xext, 2);
x = ly_scm2interval (xext);
}
Interval y;
if (yext != SCM_UNDEFINED)
{
- SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");
+ LY_ASSERT_TYPE(is_number_pair,yext, 3);
y = ly_scm2interval (yext);
}
"@var{dir} is a number -1, 1 are left and right respectively. "
"Other values are interpolated (so 0 means the center).")
{
- SCM_ASSERT_TYPE (unsmob_stencil (stil), stil, SCM_ARG1, __FUNCTION__, "stencil");
- SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
- SCM_ASSERT_TYPE (scm_is_number (dir), dir, SCM_ARG3, __FUNCTION__, "number");
+ LY_ASSERT_SMOB (Stencil, stil, 1);
+ LY_ASSERT_TYPE(is_axis,axis, 2);
+ LY_ASSERT_TYPE(scm_is_number, dir, 3);
Stencil target = *unsmob_stencil (stil);
1, 0, 0, (SCM s),
" Analyse @var{s}, and return a list of fonts used in @var{s}.")
{
+ LY_ASSERT_SMOB (Stencil, s, 1);
Stencil *stil = unsmob_stencil (s);
- SCM_ASSERT_TYPE (stil, s, SCM_ARG1, __FUNCTION__, "Stencil");
return find_expression_fonts (stil->expr ());
}
4, 0, 0, (SCM stc, SCM r, SCM g, SCM b),
"Put @var{stc} in a different color.")
{
+ LY_ASSERT_SMOB (Stencil, stc, 1);
Stencil *stil = unsmob_stencil (stc);
- SCM_ASSERT_TYPE (stil, stc, SCM_ARG1, __FUNCTION__, "Stencil");
return Stencil (stil->extent_box (),
scm_list_3 (ly_symbol2scm ("color"),
scm_list_3 (r, g, b),
4, 0, 0, (SCM expr, SCM func, SCM arg1, SCM offset),
"Parse EXPR, feed bits to FUNC with first arg ARG1")
{
- SCM_ASSERT_TYPE (ly_is_procedure (func), func, SCM_ARG1, __FUNCTION__,
- "procedure");
+ LY_ASSERT_TYPE (ly_is_procedure, func, 2);
Stencil_interpret_arguments a;
a.func = func;
"given by @var{iv}. The wings protude by an amount of @var{p}, which "
"may be negative. The thickness is given by @var{t}.")
{
- SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG1, __FUNCTION__, "axis");
- SCM_ASSERT_TYPE (is_number_pair (iv), iv, SCM_ARG2, __FUNCTION__, "number pair");
- SCM_ASSERT_TYPE (scm_is_number (t), a, SCM_ARG3, __FUNCTION__, "number");
- SCM_ASSERT_TYPE (scm_is_number (p), a, SCM_ARG4, __FUNCTION__, "number");
+ LY_ASSERT_TYPE (is_axis, a, 1);
+ LY_ASSERT_TYPE(is_number_pair,iv, 2);
+ LY_ASSERT_TYPE(scm_is_number, t,3);
+ LY_ASSERT_TYPE(scm_is_number, p,4);
return Lookup::bracket ((Axis)scm_to_int (a), ly_scm2interval (iv),
scm_to_double (t),
0.95 * scm_to_double (t)).smobbed_copy ();
}
-LY_DEFINE (ly_rotate_stencil, "ly:stencil-rotate",
+LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate",
4, 0, 0, (SCM stil, SCM angle, SCM x, SCM y),
"Return a @var{stil} rotated @var{angle} degrees around point (@var{x}, @var{y}).")
{
Stencil *s = unsmob_stencil (stil);
- SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
- SCM_ASSERT_TYPE (scm_is_number (angle), angle, SCM_ARG2, __FUNCTION__, "number");
- SCM_ASSERT_TYPE (scm_is_number (x), x, SCM_ARG3, __FUNCTION__, "number");
- SCM_ASSERT_TYPE (scm_is_number (y), y, SCM_ARG4, __FUNCTION__, "number");
+ LY_ASSERT_SMOB (Stencil, stil, 1);
+ LY_ASSERT_TYPE(scm_is_number,angle, 2);
+ LY_ASSERT_TYPE(scm_is_number, x,3);
+ LY_ASSERT_TYPE(scm_is_number, y, 4);
Real a = scm_to_double (angle);
Real x_off = scm_to_double (x);
Real y_off = scm_to_double (y);
return new_s;
}
-LY_DEFINE (ly_filled_box, "ly:round-filled-box",
+LY_DEFINE (ly_round_filled_box, "ly:round-filled-box",
3, 0, 0,
(SCM xext, SCM yext, SCM blot),
"Make a @code{Stencil} "
"that prints a black box of dimensions @var{xext}, "
"@var{yext} and roundness @var{blot}.")
{
- SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG1, __FUNCTION__, "number pair");
- SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair");
- SCM_ASSERT_TYPE (scm_is_number (blot), blot, SCM_ARG3, __FUNCTION__, "number");
+ LY_ASSERT_TYPE (is_number_pair, xext, 1);
+ LY_ASSERT_TYPE(is_number_pair, yext, 2);
+ LY_ASSERT_TYPE(scm_is_number, blot, 3);
return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)),
scm_to_double (blot)).smobbed_copy ();
(SCM symbol),
"Add @var{symbol} as head of a stencil expression")
{
- SCM_ASSERT_TYPE (scm_is_symbol (symbol), symbol,
- SCM_ARG1, __FUNCTION__, "Symbol");
+ LY_ASSERT_TYPE (ly_is_symbol, symbol, 1);
register_stencil_head (symbol);
return SCM_UNSPECIFIED;
}
void
Stencil::rotate (Real a, Offset off)
{
- rotate_degrees (a *180/M_PI, off);
+ rotate_degrees (a * 180/M_PI, off);
}
/*
- Rotate this stencil around the point [x, y]
+ Rotate this stencil around the point RELATIVE_OFF.
+
+ RELATIVE_OFF is measured in terms of the extent of the stencil, so
+ -1 = LEFT/DOWN edge, 1 = RIGHT/UP edge.
*/
void
-Stencil::rotate_degrees (Real a, Offset off)
+Stencil::rotate_degrees (Real a, Offset relative_off)
{
const Real x_cen = extent (X_AXIS).center ();
const Real y_cen = extent (Y_AXIS).center ();
/*
* Calculate the center of rotation
*/
- const Real x = x_cen + off[X_AXIS] * x_cen;
- const Real y = y_cen + off[Y_AXIS] * y_cen;
+ const Real x = x_cen + relative_off[X_AXIS] * x_cen;
+ const Real y = y_cen + relative_off[Y_AXIS] * y_cen;
/*
* Build scheme expression (processed in stencil-interpret.cc)
1, 1, 0, (SCM cl, SCM proplist),
"Creates a stream event of class @var{cl} with the given mutable property list.\n" )
{
- SCM_ASSERT_TYPE (scm_is_symbol (cl), cl, SCM_ARG1, __FUNCTION__, "symbol");
+ LY_ASSERT_TYPE (ly_is_symbol, cl, 1);
/* should be scm_list_p, but scm_list_p is expensive. */
- SCM_ASSERT_TYPE (scm_is_pair (proplist), proplist, SCM_ARG2, __FUNCTION__, "association list");
+ LY_ASSERT_TYPE(scm_is_pair, proplist, 2);
if (proplist == SCM_UNDEFINED)
proplist = SCM_EOL;
"Get the property @var{sym} of stream event @var{mus}.\n"
"If @var{sym} is undefined, return @code{'()}.\n")
{
+ LY_ASSERT_SMOB (Stream_event, sev, 1);
+ LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
+
Stream_event *e = unsmob_stream_event (sev);
- SCM_ASSERT_TYPE (e, sev, SCM_ARG1, __FUNCTION__, "stream event");
- SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
return e->internal_get_property (sym);
}
-LY_DEFINE (ly_event_set_property, "ly:event-set-property!",
+LY_DEFINE (ly_event_set_property_x, "ly:event-set-property!",
3, 0, 0, (SCM ev, SCM sym, SCM val),
- "Set property @var{sym} in event @var{ev} to @var{val}."){
- Stream_event *sc = unsmob_stream_event (ev);
- SCM_ASSERT_TYPE (sc, ev, SCM_ARG1, __FUNCTION__, "event");
+ "Set property @var{sym} in event @var{ev} to @var{val}.")
+{
+ LY_ASSERT_SMOB (Stream_event, ev, 1);
+ LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
+
return ly_prob_set_property_x (ev, sym, val);
}
SCM props,
SCM markup)
{
- Output_def *layout = unsmob_output_def (layout_smob);
-
- SCM_ASSERT_TYPE (layout, layout_smob, SCM_ARG1,
- __FUNCTION__, "Layout definition");
- SCM_ASSERT_TYPE (scm_is_string (markup), markup, SCM_ARG3,
- __FUNCTION__, "string");
+ LY_ASSERT_SMOB (Output_def, layout_smob, 1);
+ LY_ASSERT_TYPE (scm_is_string, markup, 3);
string str = ly_scm2string (markup);
-
+ Output_def *layout = unsmob_output_def (layout_smob);
Font_metric *fm = select_encoded_font (layout, props);
return fm->word_stencil (str).smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Text_interface, interpret_markup, 3);
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Text_interface, interpret_markup, 3, 0,
+ "Convert a text markup into a stencil. "
+"Takes 3 arguments, @var{layout}, @var{props} and @var{markup}. "
+"\n\n"
+"@var{layout} is a @code{\\layout} block; it may be obtained from a grob with "
+"@code{ly:grob-layout}. @var{props} is a alist chain, ie. a list of alists. "
+"This is typically obtained with "
+"@code{(ly:grob-alist-chain (ly:layout-lookup layout 'text-font-defaults))}. "
+"@var{markup} is the markup text to be processed. "
+ );
SCM
Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
{
}
ADD_INTERFACE (Text_interface,
- "A scheme markup text, see @usermanref{Text markup}.",
+ "A scheme markup text, see @usermanref{Text markup} and "
+ "@usermanref{New markup command definition}. "
+ "\n\n"
+ "There are two important commands: ly:text-interface::print, which is a "
+ "grob callback, and ly:text-interface::interpret-markup ",
+
+ /* props */
"baseline-skip "
"text "
"word-space "
}
ADD_TRANSLATOR (Text_spanner_engraver,
- /* doc */ "Create text spanner from an event.",
- /* create */ "TextSpanner",
- /* read */ "",
- /* write */ "");
+ /* doc */
+ "Create text spanner from an event.",
+ /* create */
+ "TextSpanner ",
+ /* read */
+ "",
+ /* write */
+ ""
+ );
+++ /dev/null
-/*
- text-spanner.cc -- implement Text_spanner
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000--2007 Jan Nieuwenhuizen <janneke@gnu.org>
-
- Revised over good by Han-Wen.
-*/
-
-#include "text-spanner.hh"
-
-#include "text-interface.hh"
-#include "line-spanner.hh"
-#include "spanner.hh"
-#include "font-interface.hh"
-#include "dimensions.hh"
-#include "output-def.hh"
-#include "warn.hh"
-#include "paper-column.hh"
-#include "staff-symbol-referencer.hh"
-
-/*
- TODO:
- - vertical start / vertical end (fixme-name) |
- - contination types (vert. star, vert. end) |-> eat volta-bracket
- - more styles
- - more texts/positions
-*/
-
-MAKE_SCHEME_CALLBACK (Text_spanner, print, 1);
-
-/*
- TODO: this function is too long
-*/
-SCM
-Text_spanner::print (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
- Spanner *spanner = dynamic_cast<Spanner *> (me);
-
- /* Ugh, must be same as Hairpin::print. */
-
- Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
- Output_def *layout = me->layout ();
-
- SCM flare = me->get_property ("bracket-flare");
- SCM shorten = me->get_property ("shorten-pair");
-
- Interval span_points;
- Drul_array<bool> broken;
- Direction d = LEFT;
- do
- {
- Item *b = spanner->get_bound (d);
- broken[d] = b->break_status_dir () != CENTER;
-
- if (broken[d])
- {
- if (d == LEFT)
- span_points[d] = spanner->get_broken_left_end_align ();
- else
- span_points[d] = b->relative_coordinate (common, X_AXIS);
- }
- else
- {
- Real encl = robust_scm2double (me->get_property ("enclose-bounds"), 0.0);
- Interval ext = b->extent (common, X_AXIS);
-
- span_points[d]
- = robust_relative_extent (b, common, X_AXIS).linear_combination (d * encl);
-
- if (is_number_pair (shorten))
- span_points -= d * scm_to_double (index_get_cell (shorten, d));
- }
-
- if (is_number_pair (flare))
- span_points -= d * scm_to_double (index_get_cell (flare, d));
- }
- while (flip (&d) != LEFT);
-
- SCM properties = Font_interface::text_font_alist_chain (me);
- SCM edge_text = me->get_property ("edge-text");
- Drul_array<Stencil> edge;
- if (scm_is_pair (edge_text))
- {
- Direction d = LEFT;
- do
- {
- if (broken[d])
- continue;
-
- SCM text = index_get_cell (edge_text, d);
-
- if (Text_interface::is_markup (text))
- edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
-
- if (!edge[d].is_empty ())
- edge[d].align_to (Y_AXIS, CENTER);
- }
- while (flip (&d) != LEFT);
- }
-
- Drul_array<Real> edge_height = robust_scm2interval (me->get_property ("edge-height"),
- Interval (0.0, 0.0));
- Drul_array<Stencil> edge_line;
- {
- Direction d = LEFT;
- int dir = to_dir (me->get_property ("direction"));
- do
- {
- if (broken[d])
- continue;
-
- Real dx = 0.0;
- if (is_number_pair (flare))
- dx = scm_to_double (index_get_cell (flare, d)) * d;
-
- Real dy = -dir * edge_height[d];
- if (dy)
- edge_line[d] = Line_spanner::line_stencil (me, Offset (0, 0), Offset (dx, dy));
- }
- while (flip (&d) != LEFT);
- }
-
- Stencil m;
- do
- {
- Interval ext = edge[d].extent (X_AXIS);
- if (!ext.is_empty ())
- {
- Real pad = robust_scm2double (me->get_property ("bound-padding"), 0.0);
- edge[d].translate_axis (span_points[d], X_AXIS);
- m.add_stencil (edge[d]);
- span_points[d] += -d * (ext[-d] + pad);
- }
- }
- while (flip (&d) != LEFT);
-
- do
- {
- if (d * span_points[d] > d * edge[-d].extent (X_AXIS)[d])
- {
- edge_line[d].translate_axis (span_points[d], X_AXIS);
- m.add_stencil (edge_line[d]);
- }
- }
- while (flip (&d) != LEFT);
-
-
- if (!span_points.is_empty ()
- && span_points.length () > robust_scm2double (me->get_property ("dash-period"), 0.0))
- {
- Stencil l = Line_spanner::line_stencil (me,
- Offset (span_points[LEFT], 0),
- Offset (span_points[RIGHT], 0));
- m.add_stencil (l);
- }
- m.translate_axis (- me->relative_coordinate (common, X_AXIS), X_AXIS);
- return m.smobbed_copy ();
-}
-
-ADD_INTERFACE (Text_spanner,
-
- "generic text spanner",
-
- "bound-padding "
- "bracket-flare "
- "dash-fraction "
- "dash-period "
- "edge-height "
- "edge-text "
- "enclose-bounds "
- "shorten-pair "
- "style "
- "thickness "
- );
-
if (!ties.size ())
return SCM_BOOL_T;
+
+ me->set_property ("positioning-done", SCM_BOOL_T);
+
vector_sort (ties, Tie::less);
Tie_formatting_problem problem;
"Return the type name of the translator object @var{trans}. "
"The name is a symbol.")
{
+ LY_ASSERT_SMOB (Translator, trans, 1);
Translator *tr = unsmob_translator (trans);
- SCM_ASSERT_TYPE (tr, trans, SCM_ARG1, __FUNCTION__, "Translator");
char const *nm = tr->class_name ();
return ly_symbol2scm (nm);
}
1, 0, 0, (SCM me),
"Return an alist of properties of translator @var{me}.")
{
+ LY_ASSERT_SMOB (Translator, me, 1);
Translator *tr = unsmob_translator (me);
- SCM_ASSERT_TYPE (tr, me, SCM_ARG1, __FUNCTION__, "Translator");
return tr->translator_description ();
}
ADD_TRANSLATOR (Trill_spanner_engraver,
/* doc */ "Create trill spanner from an event.",
- /* create */ "TrillSpanner",
+ /* create */
+ "TrillSpanner ",
/* read */ "",
/* write */ "");
1, 0, 0, (SCM ttf_file_name),
"Extract the PostScript name from a TrueType font.")
{
- SCM_ASSERT_TYPE (scm_is_string (ttf_file_name), ttf_file_name,
- SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1);
string file_name = ly_scm2string (ttf_file_name);
if (be_verbose_global)
progress_indication ("[" + file_name);
-LY_DEFINE (ly_ttf_to_pfa, "ly:ttf->pfa",
+LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa",
1, 0, 0, (SCM ttf_file_name),
"Convert the contents of a TTF file to Type42 PFA, returning it as "
" a string.")
{
- SCM_ASSERT_TYPE (scm_is_string (ttf_file_name), ttf_file_name,
- SCM_ARG1, __FUNCTION__, "string");
+ LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1);
string file_name = ly_scm2string (ttf_file_name);
if (be_verbose_global)
%%
\override TextSpanner #'dash-fraction = #'()
\override TextSpanner #'style = #'line
- \override TextSpanner #'edge-height = #'(0 . 0)
\override TextSpanner #'padding = #-0.1
- \override TextSpanner #'enclose-bounds = #1
- \override TextSpanner #'edge-text = #'("" . "")
}
\context {
%%
\override TextSpanner #'dash-fraction = #'()
\override TextSpanner #'style = #'line
- \override TextSpanner #'edge-height = #'(0 . 0)
\override TextSpanner #'padding = #-0.1
- \override TextSpanner #'enclose-bounds = #1
- \override TextSpanner #'edge-text = #'("" . "")
}
\context {
+++ /dev/null
-# -*-rpm-spec-mode-*-
-
-%define info yes
-%define docdir %{_docdir}/lilypond/
-
-Name: lilypond
-Version: @TOPLEVEL_VERSION@
-Release: 1
-License: GPL
-Group: Applications/Publishing
-Source0: http://lilypond.org/download/development/lilypond-@TOPLEVEL_VERSION@.tar.gz
-Summary: Create and print music notation
-URL: http://lilypond.org/
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-
-
-Buildrequires: t1utils bison flex mftrace ImageMagick
-Buildrequires: texinfo >= 4.7
-Buildrequires: guile-devel >= 1.6.4-8
-Buildrequires: freetype-devel >= 2.1
-
-Buildrequires: fontforge
-#fontforge must be >= 20041211 urg. 0.0.0-fdr.1.20041211
-
-Buildrequires: pango-devel >= 1.6.0
-Buildrequires: fontconfig-devel
-
-Requires: libstdc++ python
-Requires: guile >= 1.6.4-8 ghostscript >= 8.15
-
-%description
-LilyPond lets you create music notation. It produces
-beautiful sheet music from a high-level description file.
-
-%package documentation
-Summary: All LilyPond documentation, in HTML
-Group: Applications/Publishing
-# BuildArchitectures: noarch
-
-%description documentation
-Documentation and example files of LilyPond. An index is available at
-%{docdir}/web/Documentation/index.html
-
-%prep
-%setup
-
-%build
-
-# DO NOT use % { configure } , it hardcodes all paths, runs libtool,
-# so we can't do make prefixix=/tmp/ install.
-
-# In fact, do not take out the spaces between % and { in the above comment,
-# because RPM will gladly do a substitution anyway.
-
-# compile with static libstdc++ for better platform portability.
-./configure --enable-static-gxx --disable-checking --prefix=%{_prefix} --enable-optimising
-
-
-make -j2 all
-make web
-make -C Documentation/user local_package_docdir=%{docdir} omf
-
-%install
-
-
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
-
-make prefix="$RPM_BUILD_ROOT%{_prefix}" \
- infodir="$RPM_BUILD_ROOT%{_infodir}" \
- mandir="$RPM_BUILD_ROOT%{_mandir}" install
-
-#emacs
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
-install -m 644 elisp/lilypond-init.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
-
-#manual pages
-gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man1/*
-
-
-# profile scripts.
-
-
-# web doc
-make prefix="$RPM_BUILD_ROOT%{_prefix}" \
- infodir="$RPM_BUILD_ROOT%{_infodir}" \
- webdir="$RPM_BUILD_ROOT%{_prefix}/share/doc/lilypond/" web-install
-
-ln -sf ../../doc/lilypond/Documentation/user/*png $RPM_BUILD_ROOT%{_infodir}/lilypond/
-
-# info
-%if %{info}
-rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
-gzip -9fn `find $RPM_BUILD_ROOT%{_infodir}/ -name '*.info'`
-%endif
-
-
-
-%post
-
-touch /tmp/.lilypond-install
-
-%if %{info}
- /sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir
- /sbin/install-info %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir
- /sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir
-%endif
-
-export PACKAGEDIR=%{_datadir}/lilypond/@TOPLEVEL_VERSION@
-if [ -d /usr/share/vim ]; then
- VIMDIR=`find /usr/share/vim -name bugreport.vim`
- VIMDIR=`dirname $VIMDIR`
- for a in `cd $PACKAGEDIR/vim/ ; find -type d -name '*' ` ; do
- mkdir -p $VIMDIR/$a
- ln -s $PACKAGEDIR/vim/$a/*.vim $VIMDIR/$a/
- done
-fi
-
-
-%preun
-if [ -f /usr/share/lilypond/%{version}/ls-R ]; then
- rm -f /usr/share/lilypond/%{version}/ls-R
-fi
-
-
-if [ -d /usr/share/vim ]; then
- rm `find /usr/share/vim -name 'lilypond*.vim'`
-fi
-
-
-%if %{info}
- /sbin/install-info --delete %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir
- /sbin/install-info --delete %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir
- /sbin/install-info --delete %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir
-%endif
-
-# chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1n/
-
-%postun
-
-%post documentation
-scrollkeeper-update
-
-%postun documentation
-scrollkeeper-update
-
-
-
-%files
-%defattr(-, root, root)
-%{_datadir}/emacs/site-lisp/lilypond*
-%{_datadir}/emacs/site-lisp/site-start.d/lilypond*
-
-%{_bindir}/abc2ly
-%{_bindir}/convert-ly
-%{_bindir}/etf2ly
-%{_bindir}/lilypond
-%{_bindir}/midi2ly
-%{_bindir}/lilypond-book
-%{_bindir}/mup2ly
-%{_bindir}/musicxml2ly
-%{_bindir}/lilypond-invoke-editor
-
-%doc THANKS
-%doc COPYING
-%doc DEDICATION
-%doc README.txt
-%doc AUTHORS.txt
-%doc INSTALL.txt
-%doc NEWS.txt
-
-%if %{info}
-%{_infodir}/lilypond/
-%endif
-
-%{_mandir}/man1/abc2ly.1.gz
-%{_mandir}/man1/musicxml2ly.1.gz
-%{_mandir}/man1/convert-ly.1.gz
-%{_mandir}/man1/etf2ly.1.gz
-%{_mandir}/man1/lilypond.1.gz
-%{_mandir}/man1/midi2ly.1.gz
-%{_mandir}/man1/lilypond-book.1.gz
-%{_mandir}/man1/mup2ly.1.gz
-%{_mandir}/man1/lilypond-invoke-editor.1.gz
-
-%{_datadir}/lilypond/@TOPLEVEL_VERSION@/
-%{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
-%{_libdir}/lilypond/
-
-
-%files documentation
-
-%defattr(-, root, root)
-
-%{docdir}
-%{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@
-
-
-%clean
-rm -rf %{buildroot
charwy := 0;
fet_endchar;
+fet_beginchar("Harmonic notehead (Neo-mensural black)",
+ "s2harmonic")
+ draw_neomensural_black_head (1.3 staff_space#, 1.3 noteheight#);
+ charwx := head_width#;
+ charwy := 0;
+fet_endchar;
+
fet_beginchar("Neo-mensural semibrevis head","s0neomensural")
draw_neomensural_open_head (staff_space#, noteheight#);
fet_endchar;
return str
conversions.append (((2, 11, 11), conv, """layout-set-staff-size -> layout-set-absolute-staff-size"""))
+
+
+def conv (str):
+ str = re.sub (r"\\override\s*([a-zA-Z.]+)\s*#'arrow\s*=\s*##t",
+ r"\\override \1 #'bound-details #'right #'arrow = ##t",
+ str)
+
+ if re.search ('edge-text', str):
+ error_file.write (NOT_SMART % "edge-text settings for TextSpanner.")
+ error_file.write ("Use\n\n"
+ "\t\\override TextSpanner #'bound-details #'right #'text = <right-text>\n"
+ "\t\\override TextSpanner #'bound-details #'left #'text = <left-text>\n")
+
+
+ return str
+
+conversions.append (((2, 11, 13), conv, """#'arrow = ##t -> #'bound-details #'right #'arrow = ##t"""))
--- /dev/null
+This generic code used for all python scripts.
+
+The quotes are to ensure that the source .py file can still be
+run as a python script, but does not include any sys.path handling.
+Otherwise, the lilypond-book calls inside the build
+might modify installed .pyc files.
+
+"""
+
+for d in ['@lilypond_datadir@',
+ '@lilypond_libdir@']:
+ sys.path.insert (0, os.path.join (d, 'python'))
+
+# dynamic relocation, for GUB binaries.
+bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
+for p in ['share', 'lib']:
+ datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
+ sys.path.insert (0, datadir)
+"""
'()
)
+(ly:add-interface
+ 'trill-spanner-interface
+ "An accidental for trill pitch"
+ '())
+
(ly:add-interface
'rhythmic-grob-interface
"Any object with a duration. Used to determine which grobs are
(allow-loose-spacing ,boolean? "If set, column can be detached from main spacing.")
(arpeggio-direction ,ly:dir? "If set, put an
arrow on the arpeggio squiggly line.")
- (arrow ,boolean? "Add an arrow to the line.")
(arrow-length ,number? "Arrow length.")
(arrow-width ,number? "Arrow width.")
(auto-knee-gap ,ly:dimension? "If a gap is found between note heads
(edge-text ,pair? "A pair specifying the texts to be set at the
edges '(@var{left-text} . @var{right-text}).")
(eccentricity ,number? "How asymmetrical to make a slur. Positive means move the center to the right.")
- (enclose-bounds ,number?
- "How much of the bound a spanner should enclose:
-+1 = completely, 0 = center, -1 not at all.")
(expand-limit ,integer? "maximum number of measures expanded in church rests.")
;; remove me?
(extra-dy ,number? "Slope glissandi this much extra.")
(font-shape . italic)
(style . dashed-line)
+ ;; make sure the spanner doesn't get too close to notes
+ (minimum-Y-extent . (-1 . 1))
(bound-details . ((right . ((attach-dir . ,LEFT)
(Y . 0)
(padding . 0.75)
(padding . 0.5)
))
(left-broken . ((attach-dir . ,RIGHT)
-
- ;; make sure the - - - stays at reasonable
- ;; distance from staff.
- (text . " ")
))
))
- (stencil . ,ly:new-line-spanner::print)
- (left-bound-info . ,ly:new-line-spanner::calc-left-bound-info-and-text)
- (right-bound-info . ,ly:new-line-spanner::calc-right-bound-info)
+ (stencil . ,ly:line-spanner::print)
+ (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text)
+ (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
;; need to blend with dynamic texts.
(font-size . 1)
(meta . ((class . Spanner)
(interfaces . (font-interface
text-interface
- new-line-spanner-interface
+ line-spanner-interface
line-interface
dynamic-interface
dynamic-text-spanner-interface
(padding . 1.5)
))
))
- (stencil . ,ly:new-line-spanner::print)
- (left-bound-info . ,ly:new-line-spanner::calc-left-bound-info)
- (right-bound-info . ,ly:new-line-spanner::calc-right-bound-info)
+ (stencil . ,ly:line-spanner::print)
+ (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
+ (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
(meta . ((class . Spanner)
(interfaces . (line-interface
unbreakable-spanner-interface
- new-line-spanner-interface))))))
+ line-spanner-interface))))))
(GraceSpacing
. (
(X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
(meta . ((class . Item)
(interfaces . (piano-pedal-interface
- text-spanner-interface
- line-spanner-interface
text-interface
self-alignment-interface
piano-pedal-script-interface
(TextSpanner
. (
- (stencil . ,ly:text-spanner::print)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(font-shape . italic)
(style . dashed-line)
(side-axis . ,Y)
(direction . ,UP)
(outside-staff-priority . 350)
+
+ (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
+ (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
+ (bound-details . ((left . ((Y . 0)
+ (padding . 0.25)
+ (attach-dir . ,LEFT)
+ ))
+ (right . ((Y . 0)
+ (padding . 0.25)
+ ))
+ ))
+ (stencil . ,ly:line-spanner::print)
+
(meta . ((class . Spanner)
- (interfaces . (text-spanner-interface
- line-spanner-interface
+ (interfaces . (line-spanner-interface
side-position-interface
font-interface))))))
(TrillSpanner
. (
- (left-bound-info . ,ly:new-line-spanner::calc-left-bound-info)
- (right-bound-info . ,ly:new-line-spanner::calc-right-bound-info)
+ (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
+ (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
(bound-details . ((left . ((text . ,(make-translate-scaled-markup
'(0.5 . -0.6)
(right . ((Y . 0)))
))
- (stencil . ,ly:new-line-spanner::print)
+ (stencil . ,ly:line-spanner::print)
(style . trill)
(staff-padding . 1.0)
(side-axis . ,Y)
(outside-staff-priority . 50)
(meta . ((class . Spanner)
- (interfaces . (text-spanner-interface
- new-line-spanner-interface
+ (interfaces . (line-spanner-interface
+ line-interface
+ trill-spanner-interface
side-position-interface
font-interface))))))
(Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
(Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
(X-extent . ,ly:axis-group-interface::width)
- (skylines . ,ly:axis-group-interface::calc-skylines)
+ (skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
(max-stretch . ,ly:axis-group-interface::calc-max-stretch)
(meta . ((class . Spanner)
(object-callbacks . ((X-common . ,ly:axis-group-interface::calc-x-common)))
(padding . 1.5)
))
))
- (stencil . ,ly:new-line-spanner::print)
- (left-bound-info . ,ly:new-line-spanner::calc-left-bound-info)
- (right-bound-info . ,ly:new-line-spanner::calc-right-bound-info)
+ (stencil . ,ly:line-spanner::print)
+ (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
+ (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
(meta . ((class . Spanner)
- (interfaces . (new-line-spanner-interface
+ (interfaces . (line-spanner-interface
line-interface))))
))
(cons 'font-size (+ fs increment )))))
(interpret-markup layout (cons entries props) arg)))
-
-
-;; FIXME -> should convert to font-size.
(define-builtin-markup-command (magnify layout props sz arg) (number? markup?)
"Set the font magnification for the its argument. In the following
example, the middle A will be 10% larger:
Use @code{\\fontsize} otherwise."
(interpret-markup
layout
- (prepend-alist-chain 'font-magnification sz props)
+ (prepend-alist-chain 'font-size (magnification->font-size sz) props)
arg))
(define-builtin-markup-command (bold layout props arg) (markup?)
"Century Schoolbook L"
"Sans" "Mono" factor))
-(define-public (magstep x)
- (exp (* (/ x 6) (log 2))))
+(define-public (magstep s)
+ (exp (* (/ s 6) (log 2))))
+
+(define-public (magnification->font-size m)
+ (* 6 (/ (log m) (log 2))))
(define-public (output-framework basename book scopes fields)
(output-scopes scopes fields basename)
+ (if (ly:get-option 'clip-systems)
+ (clip-system-EPSes basename book))
+
(dump-stencils-as-EPSes
(map page-stencil (ly:paper-book-pages book)) book basename))
(ly:output-def-lookup paper 'output-scale))
(ly:bp 1)))
(landscape? (eq? (ly:output-def-lookup paper 'landscape) #t)))
- (format "%%DocumentMedia: ~a ~a ~a ~a ~a ~a\n"
- (ly:output-def-lookup paper 'papersizename)
- (round2 (if landscape? h w))
- (round2 (if landscape? w h))
- 80 ;; weight
- "()" ;; color
- "()" ;; type
+ (ly:format "%%DocumentMedia: ~a ~2f ~2f ~a ~a ~a\n"
+ (ly:output-def-lookup paper 'papersizename)
+ (if landscape? h w)
+ (if landscape? w h)
+ 80 ;; weight
+ "()" ;; color
+ "()" ;; type
)))
))
-(define (clip-system-EPSes basename paper-book)
+(define-public (clip-system-EPSes basename paper-book)
(define do-pdf (member "pdf" (ly:output-formats)))
(define (clip-score-systems basename systems)
(let*
((file (open-output-file (format "~a.scm" basename))))
+ (display ";;Creator: LilyPond\n" file)
(display ";; raw SCM output\n" file)
(for-each
(string<? (symbol->string (car x))
(symbol->string (car y))))
-(define-public (chain-assoc x alist-list)
- (if (null? alist-list)
- #f
- (let* ((handle (assoc x (car alist-list))))
- (if (pair? handle)
- handle
- (chain-assoc x (cdr alist-list))))))
-
(define-public (chain-assoc-get x alist-list . default)
"Return ALIST entry for X. Return DEFAULT (optional, else #f) if not
found."
(make-string 1 (integer->char (+ 65 (modulo i 26))))
(string-encode-integer (quotient i 26))))))
-(define-public (ly:numbers->string lst)
- (string-join (map ly:number->string lst) " "))
-
(define (number->octal-string x)
(let* ((n (inexact->exact x))
(n64 (quotient n 64))
0
(if (< x 0) -1 1)))
-(define-public (round2 num)
- (/ (round (* 100 num)) 100))
-
-(define-public (round4 num)
- (/ (round (* 10000 num)) 10000))
-(define-public (car< a b) (< (car a) (car b)))
+(define-public (car< a b)
+ (< (car a) (car b)))
(define-public (symbol<? lst r)
(string<? (symbol->string lst) (symbol->string r)))
(debug-enable 'debug)
-(define (define-scheme-options)
- (for-each (lambda (x)
- (ly:add-option (car x) (cadr x) (caddr x)))
-
- `(
- ;; NAMING: either
+(define scheme-options-definitions
+ `(
+
+ ;; NAMING: either
- ;; - [subject-]object-object-verb +"ing"
- ;; - [subject-]-verb-object-object
+ ;; - [subject-]object-object-verb +"ing"
+ ;; - [subject-]-verb-object-object
- (anti-alias-factor 1 "render at higher resolution and scale down result\nto prevent jaggies in PNG")
- (check-internal-types #f "check every property assignment for types")
- (clip-systems #f "Generate cut-out snippets of a score")
- (debug-gc #f "dump memory debugging statistics")
- (debug-gc-assert-parsed-dead #f "for memory debugging:
+ (anti-alias-factor 1 "render at higher resolution and scale down result\nto prevent jaggies in PNG")
+ (check-internal-types #f "check every property assignment for types")
+ (clip-systems #f "Generate cut-out snippets of a score")
+ (debug-gc #f "dump memory debugging statistics")
+ (debug-gc-assert-parsed-dead #f "for memory debugging:
ensure that all refs to parsed objects are dead. This is an internal option, and is switched on automatically for -ddebug-gc.")
- (debug-lexer #f "debug the flex lexer")
- (debug-parser #f "debug the bison parser")
- (debug-skylines #f "debug skylines")
- (delete-intermediate-files #f
- "delete unusable PostScript files")
- (dump-profile #f "dump timing information for each file")
- (dump-signatures #f "dump output signatures of each system. Used for regression testing.")
-
- (eps-box-padding #f "Pad EPS bounding box left edge. Guarantee alignment between systems in LaTeX.")
- (gs-load-fonts #f
- "load fonts via Ghostscript.")
- (gui #f "running from gui; redirect stderr to log file")
-
- (include-book-title-preview #t "include book-titles in preview images.")
- (include-eps-fonts #t "Include fonts in separate-system EPS files.")
- (job-count #f "Process in parallel")
- (log-file #f "redirect output to log FILE.log")
-
- (old-relative #f
- "relative for simultaneous music works
+ (debug-lexer #f "debug the flex lexer")
+ (debug-parser #f "debug the bison parser")
+ (debug-skylines #f "debug skylines")
+ (delete-intermediate-files #f
+ "delete unusable PostScript files")
+ (dump-profile #f "dump timing information for each file")
+ (dump-signatures #f "dump output signatures of each system. Used for regression testing.")
+
+ (eps-box-padding #f "Pad EPS bounding box left edge. Guarantee alignment between systems in LaTeX.")
+ (gs-load-fonts #f
+ "load fonts via Ghostscript.")
+ (gui #f "running from gui; redirect stderr to log file")
+ (help #f "show this help.")
+ (include-book-title-preview #t "include book-titles in preview images.")
+ (include-eps-fonts #t "Include fonts in separate-system EPS files.")
+ (job-count #f "Process in parallel")
+ (log-file #f "redirect output to log FILE.log")
+
+ (old-relative #f
+ "relative for simultaneous music works
similar to chord syntax")
- (point-and-click #t "use point & click")
- (paper-size "a4" "the default paper size")
- (pixmap-format "png16m" "GS format to use for pixel images")
- (protected-scheme-parsing #t "continue when finding errors in inline
+ (point-and-click #t "use point & click")
+ (paper-size "a4" "the default paper size")
+ (pixmap-format "png16m" "GS format to use for pixel images")
+ (protected-scheme-parsing #t "continue when finding errors in inline
scheme are caught in the parser. If off, halt
on errors, and print a stack trace.")
- (profile-property-accesses #f "keep statistics of get_property() calls.")
-
- (resolution 101 "resolution for generating PNG bitmaps")
- (read-file-list #f "Read files to be processed from command line arguments")
-
- (safe #f "Run safely")
- (strict-infinity-checking #f "If yes, crash on encountering Inf/NaN.")
- (separate-log-files #f "Output to FILE.log per file.")
- (trace-memory-frequency #f "Record Scheme cell usage this many times per second, and dump to file.")
- (trace-scheme-coverage #f "Record coverage of Scheme files")
- (ttf-verbosity 0
- "how much verbosity for TTF font embedding?")
- (show-available-fonts #f
- "List font names available.")
- (verbose ,(ly:command-line-verbose?) "value for the --verbose flag")
- ))
-
- (map
- (lambda (x)
- (ly:set-option (car x) (cdr x)))
- (eval-string (ly:command-line-options))))
-
+ (profile-property-accesses #f "keep statistics of get_property() calls.")
+
+ (resolution 101 "resolution for generating PNG bitmaps")
+ (read-file-list #f "Read files to be processed from command line arguments")
+
+ (safe #f "Run safely")
+ (strict-infinity-checking #f "If yes, crash on encountering Inf/NaN.")
+ (separate-log-files #f "Output to FILE.log per file.")
+ (trace-memory-frequency #f "Record Scheme cell usage this many times per second, and dump to file.")
+ (trace-scheme-coverage #f "Record coverage of Scheme files")
+ (ttf-verbosity 0
+ "how much verbosity for TTF font embedding?")
+ (show-available-fonts #f
+ "List font names available.")
+ (verbose ,(ly:command-line-verbose?) "value for the --verbose flag")
+ ))
;; need to do this in the beginning. Other parts of the
;; Scheme init depend on these options.
;;
-(define-scheme-options)
-
+(for-each
+ (lambda (x)
+ (ly:add-option (car x) (cadr x) (caddr x)))
+ scheme-options-definitions)
+(for-each
+ (lambda (x)
+ (ly:set-option (car x) (cdr x)))
+ (eval-string (ly:command-line-options)))
(debug-set! stack 0)
"safe-lily.scm"))
-
-
(for-each ly:load init-scheme-files)
(exit 0)))))
(define-public (lilypond-all files)
-
-
+ (if (ly:get-option 'help)
+ (begin
+ (ly:option-usage)
+ (exit 0)))
(if (ly:get-option 'show-available-fonts)
(begin
(ly:font-config-display-fonts)
"Replace MUS by RestEvent of the same duration if it is a
SkipEvent. Useful for extracting parts from crowded scores"
- (if (equal? (ly:music-property mus 'name) 'SkipEvent)
+ (if (memq (ly:music-property mus 'name) '(SkipEvent SkipMusic))
(make-music 'RestEvent 'duration (ly:music-property mus 'duration))
mus))
(lambda (grob) (circle-stencil (callback grob) thickness padding)))
(define-public (print-circled-text-callback grob)
- (let* ((text (ly:grob-property grob 'text))
-
- (layout (ly:grob-layout grob))
- (defs (ly:output-def-lookup layout 'text-font-defaults))
- (props (ly:grob-alist-chain grob defs))
- (circle (ly:text-interface::interpret-markup
- layout props (make-circle-markup text))))
- circle))
-
-(define-public (music-cause grob)
- (let*
- ((event (event-cause grob)))
-
- (if (ly:stream-event? event)
- (ly:event-property event 'music-cause)
- #f)))
+ (grob-interpret-markup grob (make-circle-markup
+ (ly:grob-property grob 'text))
+ ))
(define-public (event-cause grob)
(let*
;; statement. -- jr
((xcircle) "2xcircle")
((harmonic) "0harmonic")
+ ((harmonic-black) "2harmonic")
+ ((harmonic-mixed) (if (<= log 1) "0harmonic"
+ "2harmonic"))
((baroque)
;; Oops, I actually would not call this "baroque", but, for
;; backwards compatibility to 1.4, this is supposed to take
(list lp rp)))
-(define (grob-text grob text)
+(define-public (grob-interpret-markup grob text)
(let*
((layout (ly:grob-layout grob))
(defs (ly:output-def-lookup layout 'text-font-defaults))
(define-public (parentheses-item::calc-angled-bracket-stencils grob)
(let* (
(font (ly:grob-default-font grob))
- (lp (ly:stencil-aligned-to (ly:stencil-aligned-to (grob-text grob (ly:wide-char->utf-8 #x2329))
+ (lp (ly:stencil-aligned-to (ly:stencil-aligned-to (grob-interpret-markup grob (ly:wide-char->utf-8 #x2329))
Y CENTER) X RIGHT))
- (rp (ly:stencil-aligned-to (ly:stencil-aligned-to (grob-text grob (ly:wide-char->utf-8 #x232A))
+ (rp (ly:stencil-aligned-to (ly:stencil-aligned-to (grob-interpret-markup grob (ly:wide-char->utf-8 #x232A))
Y CENTER) X LEFT))
)
"Allow interpretation of tildes as lyric tieing marks."
(let*
- ((text (ly:grob-property grob 'text))
- (layout (ly:grob-layout grob))
- (defs (ly:output-def-lookup layout 'text-font-defaults))
- (props (ly:grob-alist-chain grob defs)))
+ ((text (ly:grob-property grob 'text)))
- (ly:text-interface::interpret-markup layout
- props
- (if (string? text)
- (make-tied-lyric-markup text)
- text))))
+ (grob-interpret-markup grob
+ (if (string? text)
+ (make-tied-lyric-markup text)
+ text))))
(define-public ((grob::calc-property-by-copy prop) grob)
(ly:event-property (event-cause grob) prop))
(define-public (fret-board::calc-stencil grob)
(let* ((string-frets (ly:grob-property grob 'string-fret-finger-combinations))
- (string-count (ly:grob-property grob 'string-count))
- (layout (ly:grob-layout grob))
- (defs (ly:output-def-lookup layout 'text-font-defaults))
- (props (ly:grob-alist-chain grob defs)))
-
- (make-fret-diagram layout props
- (string-frets->description string-frets 6))))
+ (string-count (ly:grob-property grob 'string-count)))
+
+ (grob-interpret-markup grob
+ (make-fret-diagram-verbose-markup
+ (string-frets->description string-frets string-count)))))
(define (number-pair->string4 numpair)
(ly:format "~4l" numpair))
-(define (numbers->string4 numlist)
- (string-join (map str4 numlist) " "))
-
;;;
;;; Lily output interface, PostScript implementation --- cleanup and docme
;;;
(cond
((ly:stream-event? cause) cause)
-; ((ly:grob? cause) (music-cause cause))
(else
#f))))
(layout-set-absolute-staff-size-in-module (current-module) sz))
(define-public (layout-set-staff-size sz)
- "Function to be called inside a \\layout{} block to set the staff size. SZ is in
-points"
+ "Function to be called inside a \\layout{} block to set the staff
+size. SZ is in points"
(layout-set-absolute-staff-size (* (eval 'pt (current-module)) sz)))
ly:grob-original
ly:grob-layout
ly:grob-parent
- ly:grob-pq-less?
ly:grob-property
ly:grob-script-priority-less
ly:grob-set-property!
ly:sustain-pedal::print
ly:system-start-delimiter::print
ly:text-interface::print
- ly:text-spanner::print
ly:tie::print
ly:time-signature::print
ly:tuplet-bracket::print
(define-public (eps-file->stencil axis size file-name)
(let*
((contents (ly:gulp-file file-name))
- (bbox (get-postscript-bbox contents))
+ (bbox (get-postscript-bbox (car (string-split contents #\nul))))
(bbox-size (if (= axis X)
(- (list-ref bbox 2) (list-ref bbox 0))
(- (list-ref bbox 3) (list-ref bbox 1))
))
(factor (exact->inexact (/ size bbox-size)))
(scaled-bbox
- (map (lambda (x) (* factor x)) bbox)))
+ (map (lambda (x) (* factor x)) bbox))
+ (clip-rect-string (format
+ "~a ~a ~a ~a rectclip"
+ (list-ref bbox 0)
+ (list-ref bbox 1)
+ (- (list-ref bbox 2) (list-ref bbox 0))
+ (- (list-ref bbox 3) (list-ref bbox 1)))))
+
(if bbox
(ly:make-stencil
gsave
currentpoint translate
BeginEPSF
-~a ~a scale
+~a dup scale
+~a
%%BeginDocument: ~a
-" factor factor
+" factor clip-rect-string
+
file-name
)
contents
;;;; (c) 2005--2006 Bernard Hurley <bernard@fong-hurley.org.uk>
;;;;
-(define-public (make-x11-color-handler)
- (let
- ((x11-color-table (make-hash-table 31))
- (x11-color-list
- '((snow 1 0.98039215686274506 0.98039215686274506)
- (GhostWhite 0.97254901960784312 0.97254901960784312 1)
- (WhiteSmoke 0.96078431372549022 0.96078431372549022 0.96078431372549022)
- (gainsboro 0.86274509803921573 0.86274509803921573 0.86274509803921573)
- (FloralWhite 1 0.98039215686274506 0.94117647058823528)
- (OldLace 0.99215686274509807 0.96078431372549022 0.90196078431372551)
- (linen 0.98039215686274506 0.94117647058823528 0.90196078431372551)
- (AntiqueWhite 0.98039215686274506 0.92156862745098034 0.84313725490196079)
- (PapayaWhip 1 0.93725490196078431 0.83529411764705885)
- (BlanchedAlmond 1 0.92156862745098034 0.80392156862745101)
- (bisque 1 0.89411764705882357 0.7686274509803922)
- (PeachPuff 1 0.85490196078431369 0.72549019607843135)
- (NavajoWhite 1 0.87058823529411766 0.67843137254901964)
- (moccasin 1 0.89411764705882357 0.70980392156862748)
- (cornsilk 1 0.97254901960784312 0.86274509803921573)
- (ivory 1 1 0.94117647058823528)
- (LemonChiffon 1 0.98039215686274506 0.80392156862745101)
- (seashell 1 0.96078431372549022 0.93333333333333335)
- (honeydew 0.94117647058823528 1 0.94117647058823528)
- (MintCream 0.96078431372549022 1 0.98039215686274506)
- (azure 0.94117647058823528 1 1)
- (AliceBlue 0.94117647058823528 0.97254901960784312 1)
- (lavender 0.90196078431372551 0.90196078431372551 0.98039215686274506)
- (LavenderBlush 1 0.94117647058823528 0.96078431372549022)
- (MistyRose 1 0.89411764705882357 0.88235294117647056)
- (white 1 1 1)
- (black 0 0 0)
- (DarkSlateGray 0.18431372549019609 0.30980392156862746 0.30980392156862746)
- (DarkSlateGrey 0.18431372549019609 0.30980392156862746 0.30980392156862746)
- (DimGray 0.41176470588235292 0.41176470588235292 0.41176470588235292)
- (DimGrey 0.41176470588235292 0.41176470588235292 0.41176470588235292)
- (SlateGray 0.4392156862745098 0.50196078431372548 0.56470588235294117)
- (SlateGrey 0.4392156862745098 0.50196078431372548 0.56470588235294117)
- (LightSlateGray 0.46666666666666667 0.53333333333333333 0.59999999999999998)
- (LightSlateGrey 0.46666666666666667 0.53333333333333333 0.59999999999999998)
- (gray 0.74509803921568629 0.74509803921568629 0.74509803921568629)
- (grey 0.74509803921568629 0.74509803921568629 0.74509803921568629)
- (LightGrey 0.82745098039215681 0.82745098039215681 0.82745098039215681)
- (LightGray 0.82745098039215681 0.82745098039215681 0.82745098039215681)
- (MidnightBlue 0.098039215686274508 0.098039215686274508 0.4392156862745098)
- (navy 0 0 0.50196078431372548)
- (NavyBlue 0 0 0.50196078431372548)
- (CornflowerBlue 0.39215686274509803 0.58431372549019611 0.92941176470588238)
- (DarkSlateBlue 0.28235294117647058 0.23921568627450981 0.54509803921568623)
- (SlateBlue 0.41568627450980394 0.35294117647058826 0.80392156862745101)
- (MediumSlateBlue 0.4823529411764706 0.40784313725490196 0.93333333333333335)
- (LightSlateBlue 0.51764705882352946 0.4392156862745098 1)
- (MediumBlue 0 0 0.80392156862745101)
- (RoyalBlue 0.25490196078431371 0.41176470588235292 0.88235294117647056)
- (blue 0 0 1)
- (DodgerBlue 0.11764705882352941 0.56470588235294117 1)
- (DeepSkyBlue 0 0.74901960784313726 1)
- (SkyBlue 0.52941176470588236 0.80784313725490198 0.92156862745098034)
- (LightSkyBlue 0.52941176470588236 0.80784313725490198 0.98039215686274506)
- (SteelBlue 0.27450980392156865 0.50980392156862742 0.70588235294117652)
- (LightSteelBlue 0.69019607843137254 0.7686274509803922 0.87058823529411766)
- (LightBlue 0.67843137254901964 0.84705882352941175 0.90196078431372551)
- (PowderBlue 0.69019607843137254 0.8784313725490196 0.90196078431372551)
- (PaleTurquoise 0.68627450980392157 0.93333333333333335 0.93333333333333335)
- (DarkTurquoise 0 0.80784313725490198 0.81960784313725488)
- (MediumTurquoise 0.28235294117647058 0.81960784313725488 0.80000000000000004)
- (turquoise 0.25098039215686274 0.8784313725490196 0.81568627450980391)
- (cyan 0 1 1)
- (LightCyan 0.8784313725490196 1 1)
- (CadetBlue 0.37254901960784315 0.61960784313725492 0.62745098039215685)
- (MediumAquamarine 0.40000000000000002 0.80392156862745101 0.66666666666666663)
- (aquamarine 0.49803921568627452 1 0.83137254901960789)
- (DarkGreen 0 0.39215686274509803 0)
- (DarkOliveGreen 0.33333333333333331 0.41960784313725491 0.18431372549019609)
- (DarkSeaGreen 0.5607843137254902 0.73725490196078436 0.5607843137254902)
- (SeaGreen 0.1803921568627451 0.54509803921568623 0.3411764705882353)
- (MediumSeaGreen 0.23529411764705882 0.70196078431372544 0.44313725490196076)
- (LightSeaGreen 0.12549019607843137 0.69803921568627447 0.66666666666666663)
- (PaleGreen 0.59607843137254901 0.98431372549019602 0.59607843137254901)
- (SpringGreen 0 1 0.49803921568627452)
- (LawnGreen 0.48627450980392156 0.9882352941176471 0)
- (green 0 1 0)
- (chartreuse 0.49803921568627452 1 0)
- (MediumSpringGreen 0 0.98039215686274506 0.60392156862745094)
- (GreenYellow 0.67843137254901964 1 0.18431372549019609)
- (LimeGreen 0.19607843137254902 0.80392156862745101 0.19607843137254902)
- (YellowGreen 0.60392156862745094 0.80392156862745101 0.19607843137254902)
- (ForestGreen 0.13333333333333333 0.54509803921568623 0.13333333333333333)
- (OliveDrab 0.41960784313725491 0.55686274509803924 0.13725490196078433)
- (DarkKhaki 0.74117647058823533 0.71764705882352942 0.41960784313725491)
- (khaki 0.94117647058823528 0.90196078431372551 0.5490196078431373)
- (PaleGoldenrod 0.93333333333333335 0.90980392156862744 0.66666666666666663)
- (LightGoldenrodYellow 0.98039215686274506 0.98039215686274506 0.82352941176470584)
- (LightYellow 1 1 0.8784313725490196)
- (yellow 1 1 0)
- (gold 1 0.84313725490196079 0)
- (LightGoldenrod 0.93333333333333335 0.8666666666666667 0.50980392156862742)
- (goldenrod 0.85490196078431369 0.6470588235294118 0.12549019607843137)
- (DarkGoldenrod 0.72156862745098038 0.52549019607843139 0.043137254901960784)
- (RosyBrown 0.73725490196078436 0.5607843137254902 0.5607843137254902)
- (IndianRed 0.80392156862745101 0.36078431372549019 0.36078431372549019)
- (SaddleBrown 0.54509803921568623 0.27058823529411763 0.074509803921568626)
- (sienna 0.62745098039215685 0.32156862745098042 0.17647058823529413)
- (peru 0.80392156862745101 0.52156862745098043 0.24705882352941178)
- (burlywood 0.87058823529411766 0.72156862745098038 0.52941176470588236)
- (beige 0.96078431372549022 0.96078431372549022 0.86274509803921573)
- (wheat 0.96078431372549022 0.87058823529411766 0.70196078431372544)
- (SandyBrown 0.95686274509803926 0.64313725490196083 0.37647058823529411)
- (tan 0.82352941176470584 0.70588235294117652 0.5490196078431373)
- (chocolate 0.82352941176470584 0.41176470588235292 0.11764705882352941)
- (firebrick 0.69803921568627447 0.13333333333333333 0.13333333333333333)
- (brown 0.6470588235294118 0.16470588235294117 0.16470588235294117)
- (DarkSalmon 0.9137254901960784 0.58823529411764708 0.47843137254901963)
- (salmon 0.98039215686274506 0.50196078431372548 0.44705882352941179)
- (LightSalmon 1 0.62745098039215685 0.47843137254901963)
- (orange 1 0.6470588235294118 0)
- (DarkOrange 1 0.5490196078431373 0)
- (coral 1 0.49803921568627452 0.31372549019607843)
- (LightCoral 0.94117647058823528 0.50196078431372548 0.50196078431372548)
- (tomato 1 0.38823529411764707 0.27843137254901962)
- (OrangeRed 1 0.27058823529411763 0)
- (red 1 0 0)
- (HotPink 1 0.41176470588235292 0.70588235294117652)
- (DeepPink 1 0.078431372549019607 0.57647058823529407)
- (pink 1 0.75294117647058822 0.79607843137254897)
- (LightPink 1 0.71372549019607845 0.75686274509803919)
- (PaleVioletRed 0.85882352941176465 0.4392156862745098 0.57647058823529407)
- (maroon 0.69019607843137254 0.18823529411764706 0.37647058823529411)
- (MediumVioletRed 0.7803921568627451 0.082352941176470587 0.52156862745098043)
- (VioletRed 0.81568627450980391 0.12549019607843137 0.56470588235294117)
- (magenta 1 0 1)
- (violet 0.93333333333333335 0.50980392156862742 0.93333333333333335)
- (plum 0.8666666666666667 0.62745098039215685 0.8666666666666667)
- (orchid 0.85490196078431369 0.4392156862745098 0.83921568627450982)
- (MediumOrchid 0.72941176470588232 0.33333333333333331 0.82745098039215681)
- (DarkOrchid 0.59999999999999998 0.19607843137254902 0.80000000000000004)
- (DarkViolet 0.58039215686274515 0 0.82745098039215681)
- (BlueViolet 0.54117647058823526 0.16862745098039217 0.88627450980392153)
- (purple 0.62745098039215685 0.12549019607843137 0.94117647058823528)
- (MediumPurple 0.57647058823529407 0.4392156862745098 0.85882352941176465)
- (thistle 0.84705882352941175 0.74901960784313726 0.84705882352941175)
- (snow1 1 0.98039215686274506 0.98039215686274506)
- (snow2 0.93333333333333335 0.9137254901960784 0.9137254901960784)
- (snow3 0.80392156862745101 0.78823529411764703 0.78823529411764703)
- (snow4 0.54509803921568623 0.53725490196078429 0.53725490196078429)
- (seashell1 1 0.96078431372549022 0.93333333333333335)
- (seashell2 0.93333333333333335 0.89803921568627454 0.87058823529411766)
- (seashell3 0.80392156862745101 0.77254901960784317 0.74901960784313726)
- (seashell4 0.54509803921568623 0.52549019607843139 0.50980392156862742)
- (AntiqueWhite1 1 0.93725490196078431 0.85882352941176465)
- (AntiqueWhite2 0.93333333333333335 0.87450980392156863 0.80000000000000004)
- (AntiqueWhite3 0.80392156862745101 0.75294117647058822 0.69019607843137254)
- (AntiqueWhite4 0.54509803921568623 0.51372549019607838 0.47058823529411764)
- (bisque1 1 0.89411764705882357 0.7686274509803922)
- (bisque2 0.93333333333333335 0.83529411764705885 0.71764705882352942)
- (bisque3 0.80392156862745101 0.71764705882352942 0.61960784313725492)
- (bisque4 0.54509803921568623 0.49019607843137253 0.41960784313725491)
- (PeachPuff1 1 0.85490196078431369 0.72549019607843135)
- (PeachPuff2 0.93333333333333335 0.79607843137254897 0.67843137254901964)
- (PeachPuff3 0.80392156862745101 0.68627450980392157 0.58431372549019611)
- (PeachPuff4 0.54509803921568623 0.46666666666666667 0.396078431372549)
- (NavajoWhite1 1 0.87058823529411766 0.67843137254901964)
- (NavajoWhite2 0.93333333333333335 0.81176470588235294 0.63137254901960782)
- (NavajoWhite3 0.80392156862745101 0.70196078431372544 0.54509803921568623)
- (NavajoWhite4 0.54509803921568623 0.47450980392156861 0.36862745098039218)
- (LemonChiffon1 1 0.98039215686274506 0.80392156862745101)
- (LemonChiffon2 0.93333333333333335 0.9137254901960784 0.74901960784313726)
- (LemonChiffon3 0.80392156862745101 0.78823529411764703 0.6470588235294118)
- (LemonChiffon4 0.54509803921568623 0.53725490196078429 0.4392156862745098)
- (cornsilk1 1 0.97254901960784312 0.86274509803921573)
- (cornsilk2 0.93333333333333335 0.90980392156862744 0.80392156862745101)
- (cornsilk3 0.80392156862745101 0.78431372549019607 0.69411764705882351)
- (cornsilk4 0.54509803921568623 0.53333333333333333 0.47058823529411764)
- (ivory1 1 1 0.94117647058823528)
- (ivory2 0.93333333333333335 0.93333333333333335 0.8784313725490196)
- (ivory3 0.80392156862745101 0.80392156862745101 0.75686274509803919)
- (ivory4 0.54509803921568623 0.54509803921568623 0.51372549019607838)
- (honeydew1 0.94117647058823528 1 0.94117647058823528)
- (honeydew2 0.8784313725490196 0.93333333333333335 0.8784313725490196)
- (honeydew3 0.75686274509803919 0.80392156862745101 0.75686274509803919)
- (honeydew4 0.51372549019607838 0.54509803921568623 0.51372549019607838)
- (LavenderBlush1 1 0.94117647058823528 0.96078431372549022)
- (LavenderBlush2 0.93333333333333335 0.8784313725490196 0.89803921568627454)
- (LavenderBlush3 0.80392156862745101 0.75686274509803919 0.77254901960784317)
- (LavenderBlush4 0.54509803921568623 0.51372549019607838 0.52549019607843139)
- (MistyRose1 1 0.89411764705882357 0.88235294117647056)
- (MistyRose2 0.93333333333333335 0.83529411764705885 0.82352941176470584)
- (MistyRose3 0.80392156862745101 0.71764705882352942 0.70980392156862748)
- (MistyRose4 0.54509803921568623 0.49019607843137253 0.4823529411764706)
- (azure1 0.94117647058823528 1 1)
- (azure2 0.8784313725490196 0.93333333333333335 0.93333333333333335)
- (azure3 0.75686274509803919 0.80392156862745101 0.80392156862745101)
- (azure4 0.51372549019607838 0.54509803921568623 0.54509803921568623)
- (SlateBlue1 0.51372549019607838 0.43529411764705883 1)
- (SlateBlue2 0.47843137254901963 0.40392156862745099 0.93333333333333335)
- (SlateBlue3 0.41176470588235292 0.34901960784313724 0.80392156862745101)
- (SlateBlue4 0.27843137254901962 0.23529411764705882 0.54509803921568623)
- (RoyalBlue1 0.28235294117647058 0.46274509803921571 1)
- (RoyalBlue2 0.2627450980392157 0.43137254901960786 0.93333333333333335)
- (RoyalBlue3 0.22745098039215686 0.37254901960784315 0.80392156862745101)
- (RoyalBlue4 0.15294117647058825 0.25098039215686274 0.54509803921568623)
- (blue1 0 0 1)
- (blue2 0 0 0.93333333333333335)
- (blue3 0 0 0.80392156862745101)
- (blue4 0 0 0.54509803921568623)
- (DodgerBlue1 0.11764705882352941 0.56470588235294117 1)
- (DodgerBlue2 0.10980392156862745 0.52549019607843139 0.93333333333333335)
- (DodgerBlue3 0.094117647058823528 0.45490196078431372 0.80392156862745101)
- (DodgerBlue4 0.062745098039215685 0.30588235294117649 0.54509803921568623)
- (SteelBlue1 0.38823529411764707 0.72156862745098038 1)
- (SteelBlue2 0.36078431372549019 0.67450980392156867 0.93333333333333335)
- (SteelBlue3 0.30980392156862746 0.58039215686274515 0.80392156862745101)
- (SteelBlue4 0.21176470588235294 0.39215686274509803 0.54509803921568623)
- (DeepSkyBlue1 0 0.74901960784313726 1)
- (DeepSkyBlue2 0 0.69803921568627447 0.93333333333333335)
- (DeepSkyBlue3 0 0.60392156862745094 0.80392156862745101)
- (DeepSkyBlue4 0 0.40784313725490196 0.54509803921568623)
- (SkyBlue1 0.52941176470588236 0.80784313725490198 1)
- (SkyBlue2 0.49411764705882355 0.75294117647058822 0.93333333333333335)
- (SkyBlue3 0.42352941176470588 0.65098039215686276 0.80392156862745101)
- (SkyBlue4 0.29019607843137257 0.4392156862745098 0.54509803921568623)
- (LightSkyBlue1 0.69019607843137254 0.88627450980392153 1)
- (LightSkyBlue2 0.64313725490196083 0.82745098039215681 0.93333333333333335)
- (LightSkyBlue3 0.55294117647058827 0.71372549019607845 0.80392156862745101)
- (LightSkyBlue4 0.37647058823529411 0.4823529411764706 0.54509803921568623)
- (SlateGray1 0.77647058823529413 0.88627450980392153 1)
- (SlateGray2 0.72549019607843135 0.82745098039215681 0.93333333333333335)
- (SlateGray3 0.62352941176470589 0.71372549019607845 0.80392156862745101)
- (SlateGray4 0.42352941176470588 0.4823529411764706 0.54509803921568623)
- (LightSteelBlue1 0.792156862745098 0.88235294117647056 1)
- (LightSteelBlue2 0.73725490196078436 0.82352941176470584 0.93333333333333335)
- (LightSteelBlue3 0.63529411764705879 0.70980392156862748 0.80392156862745101)
- (LightSteelBlue4 0.43137254901960786 0.4823529411764706 0.54509803921568623)
- (LightBlue1 0.74901960784313726 0.93725490196078431 1)
- (LightBlue2 0.69803921568627447 0.87450980392156863 0.93333333333333335)
- (LightBlue3 0.60392156862745094 0.75294117647058822 0.80392156862745101)
- (LightBlue4 0.40784313725490196 0.51372549019607838 0.54509803921568623)
- (LightCyan1 0.8784313725490196 1 1)
- (LightCyan2 0.81960784313725488 0.93333333333333335 0.93333333333333335)
- (LightCyan3 0.70588235294117652 0.80392156862745101 0.80392156862745101)
- (LightCyan4 0.47843137254901963 0.54509803921568623 0.54509803921568623)
- (PaleTurquoise1 0.73333333333333328 1 1)
- (PaleTurquoise2 0.68235294117647061 0.93333333333333335 0.93333333333333335)
- (PaleTurquoise3 0.58823529411764708 0.80392156862745101 0.80392156862745101)
- (PaleTurquoise4 0.40000000000000002 0.54509803921568623 0.54509803921568623)
- (CadetBlue1 0.59607843137254901 0.96078431372549022 1)
- (CadetBlue2 0.55686274509803924 0.89803921568627454 0.93333333333333335)
- (CadetBlue3 0.47843137254901963 0.77254901960784317 0.80392156862745101)
- (CadetBlue4 0.32549019607843138 0.52549019607843139 0.54509803921568623)
- (turquoise1 0 0.96078431372549022 1)
- (turquoise2 0 0.89803921568627454 0.93333333333333335)
- (turquoise3 0 0.77254901960784317 0.80392156862745101)
- (turquoise4 0 0.52549019607843139 0.54509803921568623)
- (cyan1 0 1 1)
- (cyan2 0 0.93333333333333335 0.93333333333333335)
- (cyan3 0 0.80392156862745101 0.80392156862745101)
- (cyan4 0 0.54509803921568623 0.54509803921568623)
- (DarkSlateGray1 0.59215686274509804 1 1)
- (DarkSlateGray2 0.55294117647058827 0.93333333333333335 0.93333333333333335)
- (DarkSlateGray3 0.47450980392156861 0.80392156862745101 0.80392156862745101)
- (DarkSlateGray4 0.32156862745098042 0.54509803921568623 0.54509803921568623)
- (aquamarine1 0.49803921568627452 1 0.83137254901960789)
- (aquamarine2 0.46274509803921571 0.93333333333333335 0.77647058823529413)
- (aquamarine3 0.40000000000000002 0.80392156862745101 0.66666666666666663)
- (aquamarine4 0.27058823529411763 0.54509803921568623 0.45490196078431372)
- (DarkSeaGreen1 0.75686274509803919 1 0.75686274509803919)
- (DarkSeaGreen2 0.70588235294117652 0.93333333333333335 0.70588235294117652)
- (DarkSeaGreen3 0.60784313725490191 0.80392156862745101 0.60784313725490191)
- (DarkSeaGreen4 0.41176470588235292 0.54509803921568623 0.41176470588235292)
- (SeaGreen1 0.32941176470588235 1 0.62352941176470589)
- (SeaGreen2 0.30588235294117649 0.93333333333333335 0.58039215686274515)
- (SeaGreen3 0.2627450980392157 0.80392156862745101 0.50196078431372548)
- (SeaGreen4 0.1803921568627451 0.54509803921568623 0.3411764705882353)
- (PaleGreen1 0.60392156862745094 1 0.60392156862745094)
- (PaleGreen2 0.56470588235294117 0.93333333333333335 0.56470588235294117)
- (PaleGreen3 0.48627450980392156 0.80392156862745101 0.48627450980392156)
- (PaleGreen4 0.32941176470588235 0.54509803921568623 0.32941176470588235)
- (SpringGreen1 0 1 0.49803921568627452)
- (SpringGreen2 0 0.93333333333333335 0.46274509803921571)
- (SpringGreen3 0 0.80392156862745101 0.40000000000000002)
- (SpringGreen4 0 0.54509803921568623 0.27058823529411763)
- (green1 0 1 0)
- (green2 0 0.93333333333333335 0)
- (green3 0 0.80392156862745101 0)
- (green4 0 0.54509803921568623 0)
- (chartreuse1 0.49803921568627452 1 0)
- (chartreuse2 0.46274509803921571 0.93333333333333335 0)
- (chartreuse3 0.40000000000000002 0.80392156862745101 0)
- (chartreuse4 0.27058823529411763 0.54509803921568623 0)
- (OliveDrab1 0.75294117647058822 1 0.24313725490196078)
- (OliveDrab2 0.70196078431372544 0.93333333333333335 0.22745098039215686)
- (OliveDrab3 0.60392156862745094 0.80392156862745101 0.19607843137254902)
- (OliveDrab4 0.41176470588235292 0.54509803921568623 0.13333333333333333)
- (DarkOliveGreen1 0.792156862745098 1 0.4392156862745098)
- (DarkOliveGreen2 0.73725490196078436 0.93333333333333335 0.40784313725490196)
- (DarkOliveGreen3 0.63529411764705879 0.80392156862745101 0.35294117647058826)
- (DarkOliveGreen4 0.43137254901960786 0.54509803921568623 0.23921568627450981)
- (khaki1 1 0.96470588235294119 0.5607843137254902)
- (khaki2 0.93333333333333335 0.90196078431372551 0.52156862745098043)
- (khaki3 0.80392156862745101 0.77647058823529413 0.45098039215686275)
- (khaki4 0.54509803921568623 0.52549019607843139 0.30588235294117649)
- (LightGoldenrod1 1 0.92549019607843142 0.54509803921568623)
- (LightGoldenrod2 0.93333333333333335 0.86274509803921573 0.50980392156862742)
- (LightGoldenrod3 0.80392156862745101 0.74509803921568629 0.4392156862745098)
- (LightGoldenrod4 0.54509803921568623 0.50588235294117645 0.29803921568627451)
- (LightYellow1 1 1 0.8784313725490196)
- (LightYellow2 0.93333333333333335 0.93333333333333335 0.81960784313725488)
- (LightYellow3 0.80392156862745101 0.80392156862745101 0.70588235294117652)
- (LightYellow4 0.54509803921568623 0.54509803921568623 0.47843137254901963)
- (yellow1 1 1 0)
- (yellow2 0.93333333333333335 0.93333333333333335 0)
- (yellow3 0.80392156862745101 0.80392156862745101 0)
- (yellow4 0.54509803921568623 0.54509803921568623 0)
- (gold1 1 0.84313725490196079 0)
- (gold2 0.93333333333333335 0.78823529411764703 0)
- (gold3 0.80392156862745101 0.67843137254901964 0)
- (gold4 0.54509803921568623 0.45882352941176469 0)
- (goldenrod1 1 0.75686274509803919 0.14509803921568629)
- (goldenrod2 0.93333333333333335 0.70588235294117652 0.13333333333333333)
- (goldenrod3 0.80392156862745101 0.60784313725490191 0.11372549019607843)
- (goldenrod4 0.54509803921568623 0.41176470588235292 0.078431372549019607)
- (DarkGoldenrod1 1 0.72549019607843135 0.058823529411764705)
- (DarkGoldenrod2 0.93333333333333335 0.67843137254901964 0.054901960784313725)
- (DarkGoldenrod3 0.80392156862745101 0.58431372549019611 0.047058823529411764)
- (DarkGoldenrod4 0.54509803921568623 0.396078431372549 0.031372549019607843)
- (RosyBrown1 1 0.75686274509803919 0.75686274509803919)
- (RosyBrown2 0.93333333333333335 0.70588235294117652 0.70588235294117652)
- (RosyBrown3 0.80392156862745101 0.60784313725490191 0.60784313725490191)
- (RosyBrown4 0.54509803921568623 0.41176470588235292 0.41176470588235292)
- (IndianRed1 1 0.41568627450980394 0.41568627450980394)
- (IndianRed2 0.93333333333333335 0.38823529411764707 0.38823529411764707)
- (IndianRed3 0.80392156862745101 0.33333333333333331 0.33333333333333331)
- (IndianRed4 0.54509803921568623 0.22745098039215686 0.22745098039215686)
- (sienna1 1 0.50980392156862742 0.27843137254901962)
- (sienna2 0.93333333333333335 0.47450980392156861 0.25882352941176473)
- (sienna3 0.80392156862745101 0.40784313725490196 0.22352941176470589)
- (sienna4 0.54509803921568623 0.27843137254901962 0.14901960784313725)
- (burlywood1 1 0.82745098039215681 0.60784313725490191)
- (burlywood2 0.93333333333333335 0.77254901960784317 0.56862745098039214)
- (burlywood3 0.80392156862745101 0.66666666666666663 0.49019607843137253)
- (burlywood4 0.54509803921568623 0.45098039215686275 0.33333333333333331)
- (wheat1 1 0.90588235294117647 0.72941176470588232)
- (wheat2 0.93333333333333335 0.84705882352941175 0.68235294117647061)
- (wheat3 0.80392156862745101 0.72941176470588232 0.58823529411764708)
- (wheat4 0.54509803921568623 0.49411764705882355 0.40000000000000002)
- (tan1 1 0.6470588235294118 0.30980392156862746)
- (tan2 0.93333333333333335 0.60392156862745094 0.28627450980392155)
- (tan3 0.80392156862745101 0.52156862745098043 0.24705882352941178)
- (tan4 0.54509803921568623 0.35294117647058826 0.16862745098039217)
- (chocolate1 1 0.49803921568627452 0.14117647058823529)
- (chocolate2 0.93333333333333335 0.46274509803921571 0.12941176470588237)
- (chocolate3 0.80392156862745101 0.40000000000000002 0.11372549019607843)
- (chocolate4 0.54509803921568623 0.27058823529411763 0.074509803921568626)
- (firebrick1 1 0.18823529411764706 0.18823529411764706)
- (firebrick2 0.93333333333333335 0.17254901960784313 0.17254901960784313)
- (firebrick3 0.80392156862745101 0.14901960784313725 0.14901960784313725)
- (firebrick4 0.54509803921568623 0.10196078431372549 0.10196078431372549)
- (brown1 1 0.25098039215686274 0.25098039215686274)
- (brown2 0.93333333333333335 0.23137254901960785 0.23137254901960785)
- (brown3 0.80392156862745101 0.20000000000000001 0.20000000000000001)
- (brown4 0.54509803921568623 0.13725490196078433 0.13725490196078433)
- (salmon1 1 0.5490196078431373 0.41176470588235292)
- (salmon2 0.93333333333333335 0.50980392156862742 0.3843137254901961)
- (salmon3 0.80392156862745101 0.4392156862745098 0.32941176470588235)
- (salmon4 0.54509803921568623 0.29803921568627451 0.22352941176470589)
- (LightSalmon1 1 0.62745098039215685 0.47843137254901963)
- (LightSalmon2 0.93333333333333335 0.58431372549019611 0.44705882352941179)
- (LightSalmon3 0.80392156862745101 0.50588235294117645 0.3843137254901961)
- (LightSalmon4 0.54509803921568623 0.3411764705882353 0.25882352941176473)
- (orange1 1 0.6470588235294118 0)
- (orange2 0.93333333333333335 0.60392156862745094 0)
- (orange3 0.80392156862745101 0.52156862745098043 0)
- (orange4 0.54509803921568623 0.35294117647058826 0)
- (DarkOrange1 1 0.49803921568627452 0)
- (DarkOrange2 0.93333333333333335 0.46274509803921571 0)
- (DarkOrange3 0.80392156862745101 0.40000000000000002 0)
- (DarkOrange4 0.54509803921568623 0.27058823529411763 0)
- (coral1 1 0.44705882352941179 0.33725490196078434)
- (coral2 0.93333333333333335 0.41568627450980394 0.31372549019607843)
- (coral3 0.80392156862745101 0.35686274509803922 0.27058823529411763)
- (coral4 0.54509803921568623 0.24313725490196078 0.18431372549019609)
- (tomato1 1 0.38823529411764707 0.27843137254901962)
- (tomato2 0.93333333333333335 0.36078431372549019 0.25882352941176473)
- (tomato3 0.80392156862745101 0.30980392156862746 0.22352941176470589)
- (tomato4 0.54509803921568623 0.21176470588235294 0.14901960784313725)
- (OrangeRed1 1 0.27058823529411763 0)
- (OrangeRed2 0.93333333333333335 0.25098039215686274 0)
- (OrangeRed3 0.80392156862745101 0.21568627450980393 0)
- (OrangeRed4 0.54509803921568623 0.14509803921568629 0)
- (red1 1 0 0)
- (red2 0.93333333333333335 0 0)
- (red3 0.80392156862745101 0 0)
- (red4 0.54509803921568623 0 0)
- (DeepPink1 1 0.078431372549019607 0.57647058823529407)
- (DeepPink2 0.93333333333333335 0.070588235294117646 0.53725490196078429)
- (DeepPink3 0.80392156862745101 0.062745098039215685 0.46274509803921571)
- (DeepPink4 0.54509803921568623 0.039215686274509803 0.31372549019607843)
- (HotPink1 1 0.43137254901960786 0.70588235294117652)
- (HotPink2 0.93333333333333335 0.41568627450980394 0.65490196078431373)
- (HotPink3 0.80392156862745101 0.37647058823529411 0.56470588235294117)
- (HotPink4 0.54509803921568623 0.22745098039215686 0.3843137254901961)
- (pink1 1 0.70980392156862748 0.77254901960784317)
- (pink2 0.93333333333333335 0.66274509803921566 0.72156862745098038)
- (pink3 0.80392156862745101 0.56862745098039214 0.61960784313725492)
- (pink4 0.54509803921568623 0.38823529411764707 0.42352941176470588)
- (LightPink1 1 0.68235294117647061 0.72549019607843135)
- (LightPink2 0.93333333333333335 0.63529411764705879 0.67843137254901964)
- (LightPink3 0.80392156862745101 0.5490196078431373 0.58431372549019611)
- (LightPink4 0.54509803921568623 0.37254901960784315 0.396078431372549)
- (PaleVioletRed1 1 0.50980392156862742 0.6705882352941176)
- (PaleVioletRed2 0.93333333333333335 0.47450980392156861 0.62352941176470589)
- (PaleVioletRed3 0.80392156862745101 0.40784313725490196 0.53725490196078429)
- (PaleVioletRed4 0.54509803921568623 0.27843137254901962 0.36470588235294116)
- (maroon1 1 0.20392156862745098 0.70196078431372544)
- (maroon2 0.93333333333333335 0.18823529411764706 0.65490196078431373)
- (maroon3 0.80392156862745101 0.16078431372549021 0.56470588235294117)
- (maroon4 0.54509803921568623 0.10980392156862745 0.3843137254901961)
- (VioletRed1 1 0.24313725490196078 0.58823529411764708)
- (VioletRed2 0.93333333333333335 0.22745098039215686 0.5490196078431373)
- (VioletRed3 0.80392156862745101 0.19607843137254902 0.47058823529411764)
- (VioletRed4 0.54509803921568623 0.13333333333333333 0.32156862745098042)
- (magenta1 1 0 1)
- (magenta2 0.93333333333333335 0 0.93333333333333335)
- (magenta3 0.80392156862745101 0 0.80392156862745101)
- (magenta4 0.54509803921568623 0 0.54509803921568623)
- (orchid1 1 0.51372549019607838 0.98039215686274506)
- (orchid2 0.93333333333333335 0.47843137254901963 0.9137254901960784)
- (orchid3 0.80392156862745101 0.41176470588235292 0.78823529411764703)
- (orchid4 0.54509803921568623 0.27843137254901962 0.53725490196078429)
- (plum1 1 0.73333333333333328 1)
- (plum2 0.93333333333333335 0.68235294117647061 0.93333333333333335)
- (plum3 0.80392156862745101 0.58823529411764708 0.80392156862745101)
- (plum4 0.54509803921568623 0.40000000000000002 0.54509803921568623)
- (MediumOrchid1 0.8784313725490196 0.40000000000000002 1)
- (MediumOrchid2 0.81960784313725488 0.37254901960784315 0.93333333333333335)
- (MediumOrchid3 0.70588235294117652 0.32156862745098042 0.80392156862745101)
- (MediumOrchid4 0.47843137254901963 0.21568627450980393 0.54509803921568623)
- (DarkOrchid1 0.74901960784313726 0.24313725490196078 1)
- (DarkOrchid2 0.69803921568627447 0.22745098039215686 0.93333333333333335)
- (DarkOrchid3 0.60392156862745094 0.19607843137254902 0.80392156862745101)
- (DarkOrchid4 0.40784313725490196 0.13333333333333333 0.54509803921568623)
- (purple1 0.60784313725490191 0.18823529411764706 1)
- (purple2 0.56862745098039214 0.17254901960784313 0.93333333333333335)
- (purple3 0.49019607843137253 0.14901960784313725 0.80392156862745101)
- (purple4 0.33333333333333331 0.10196078431372549 0.54509803921568623)
- (MediumPurple1 0.6705882352941176 0.50980392156862742 1)
- (MediumPurple2 0.62352941176470589 0.47450980392156861 0.93333333333333335)
- (MediumPurple3 0.53725490196078429 0.40784313725490196 0.80392156862745101)
- (MediumPurple4 0.36470588235294116 0.27843137254901962 0.54509803921568623)
- (thistle1 1 0.88235294117647056 1)
- (thistle2 0.93333333333333335 0.82352941176470584 0.93333333333333335)
- (thistle3 0.80392156862745101 0.70980392156862748 0.80392156862745101)
- (thistle4 0.54509803921568623 0.4823529411764706 0.54509803921568623)
- (gray0 0 0 0)
- (grey0 0 0 0)
- (gray1 0.011764705882352941 0.011764705882352941 0.011764705882352941)
- (grey1 0.011764705882352941 0.011764705882352941 0.011764705882352941)
- (gray2 0.019607843137254902 0.019607843137254902 0.019607843137254902)
- (grey2 0.019607843137254902 0.019607843137254902 0.019607843137254902)
- (gray3 0.031372549019607843 0.031372549019607843 0.031372549019607843)
- (grey3 0.031372549019607843 0.031372549019607843 0.031372549019607843)
- (gray4 0.039215686274509803 0.039215686274509803 0.039215686274509803)
- (grey4 0.039215686274509803 0.039215686274509803 0.039215686274509803)
- (gray5 0.050980392156862744 0.050980392156862744 0.050980392156862744)
- (grey5 0.050980392156862744 0.050980392156862744 0.050980392156862744)
- (gray6 0.058823529411764705 0.058823529411764705 0.058823529411764705)
- (grey6 0.058823529411764705 0.058823529411764705 0.058823529411764705)
- (gray7 0.070588235294117646 0.070588235294117646 0.070588235294117646)
- (grey7 0.070588235294117646 0.070588235294117646 0.070588235294117646)
- (gray8 0.078431372549019607 0.078431372549019607 0.078431372549019607)
- (grey8 0.078431372549019607 0.078431372549019607 0.078431372549019607)
- (gray9 0.090196078431372548 0.090196078431372548 0.090196078431372548)
- (grey9 0.090196078431372548 0.090196078431372548 0.090196078431372548)
- (gray10 0.10196078431372549 0.10196078431372549 0.10196078431372549)
- (grey10 0.10196078431372549 0.10196078431372549 0.10196078431372549)
- (gray11 0.10980392156862745 0.10980392156862745 0.10980392156862745)
- (grey11 0.10980392156862745 0.10980392156862745 0.10980392156862745)
- (gray12 0.12156862745098039 0.12156862745098039 0.12156862745098039)
- (grey12 0.12156862745098039 0.12156862745098039 0.12156862745098039)
- (gray13 0.12941176470588237 0.12941176470588237 0.12941176470588237)
- (grey13 0.12941176470588237 0.12941176470588237 0.12941176470588237)
- (gray14 0.14117647058823529 0.14117647058823529 0.14117647058823529)
- (grey14 0.14117647058823529 0.14117647058823529 0.14117647058823529)
- (gray15 0.14901960784313725 0.14901960784313725 0.14901960784313725)
- (grey15 0.14901960784313725 0.14901960784313725 0.14901960784313725)
- (gray16 0.16078431372549021 0.16078431372549021 0.16078431372549021)
- (grey16 0.16078431372549021 0.16078431372549021 0.16078431372549021)
- (gray17 0.16862745098039217 0.16862745098039217 0.16862745098039217)
- (grey17 0.16862745098039217 0.16862745098039217 0.16862745098039217)
- (gray18 0.1803921568627451 0.1803921568627451 0.1803921568627451)
- (grey18 0.1803921568627451 0.1803921568627451 0.1803921568627451)
- (gray19 0.18823529411764706 0.18823529411764706 0.18823529411764706)
- (grey19 0.18823529411764706 0.18823529411764706 0.18823529411764706)
- (gray20 0.20000000000000001 0.20000000000000001 0.20000000000000001)
- (grey20 0.20000000000000001 0.20000000000000001 0.20000000000000001)
- (gray21 0.21176470588235294 0.21176470588235294 0.21176470588235294)
- (grey21 0.21176470588235294 0.21176470588235294 0.21176470588235294)
- (gray22 0.2196078431372549 0.2196078431372549 0.2196078431372549)
- (grey22 0.2196078431372549 0.2196078431372549 0.2196078431372549)
- (gray23 0.23137254901960785 0.23137254901960785 0.23137254901960785)
- (grey23 0.23137254901960785 0.23137254901960785 0.23137254901960785)
- (gray24 0.23921568627450981 0.23921568627450981 0.23921568627450981)
- (grey24 0.23921568627450981 0.23921568627450981 0.23921568627450981)
- (gray25 0.25098039215686274 0.25098039215686274 0.25098039215686274)
- (grey25 0.25098039215686274 0.25098039215686274 0.25098039215686274)
- (gray26 0.25882352941176473 0.25882352941176473 0.25882352941176473)
- (grey26 0.25882352941176473 0.25882352941176473 0.25882352941176473)
- (gray27 0.27058823529411763 0.27058823529411763 0.27058823529411763)
- (grey27 0.27058823529411763 0.27058823529411763 0.27058823529411763)
- (gray28 0.27843137254901962 0.27843137254901962 0.27843137254901962)
- (grey28 0.27843137254901962 0.27843137254901962 0.27843137254901962)
- (gray29 0.29019607843137257 0.29019607843137257 0.29019607843137257)
- (grey29 0.29019607843137257 0.29019607843137257 0.29019607843137257)
- (gray30 0.30196078431372547 0.30196078431372547 0.30196078431372547)
- (grey30 0.30196078431372547 0.30196078431372547 0.30196078431372547)
- (gray31 0.30980392156862746 0.30980392156862746 0.30980392156862746)
- (grey31 0.30980392156862746 0.30980392156862746 0.30980392156862746)
- (gray32 0.32156862745098042 0.32156862745098042 0.32156862745098042)
- (grey32 0.32156862745098042 0.32156862745098042 0.32156862745098042)
- (gray33 0.32941176470588235 0.32941176470588235 0.32941176470588235)
- (grey33 0.32941176470588235 0.32941176470588235 0.32941176470588235)
- (gray34 0.3411764705882353 0.3411764705882353 0.3411764705882353)
- (grey34 0.3411764705882353 0.3411764705882353 0.3411764705882353)
- (gray35 0.34901960784313724 0.34901960784313724 0.34901960784313724)
- (grey35 0.34901960784313724 0.34901960784313724 0.34901960784313724)
- (gray36 0.36078431372549019 0.36078431372549019 0.36078431372549019)
- (grey36 0.36078431372549019 0.36078431372549019 0.36078431372549019)
- (gray37 0.36862745098039218 0.36862745098039218 0.36862745098039218)
- (grey37 0.36862745098039218 0.36862745098039218 0.36862745098039218)
- (gray38 0.38039215686274508 0.38039215686274508 0.38039215686274508)
- (grey38 0.38039215686274508 0.38039215686274508 0.38039215686274508)
- (gray39 0.38823529411764707 0.38823529411764707 0.38823529411764707)
- (grey39 0.38823529411764707 0.38823529411764707 0.38823529411764707)
- (gray40 0.40000000000000002 0.40000000000000002 0.40000000000000002)
- (grey40 0.40000000000000002 0.40000000000000002 0.40000000000000002)
- (gray41 0.41176470588235292 0.41176470588235292 0.41176470588235292)
- (grey41 0.41176470588235292 0.41176470588235292 0.41176470588235292)
- (gray42 0.41960784313725491 0.41960784313725491 0.41960784313725491)
- (grey42 0.41960784313725491 0.41960784313725491 0.41960784313725491)
- (gray43 0.43137254901960786 0.43137254901960786 0.43137254901960786)
- (grey43 0.43137254901960786 0.43137254901960786 0.43137254901960786)
- (gray44 0.4392156862745098 0.4392156862745098 0.4392156862745098)
- (grey44 0.4392156862745098 0.4392156862745098 0.4392156862745098)
- (gray45 0.45098039215686275 0.45098039215686275 0.45098039215686275)
- (grey45 0.45098039215686275 0.45098039215686275 0.45098039215686275)
- (gray46 0.45882352941176469 0.45882352941176469 0.45882352941176469)
- (grey46 0.45882352941176469 0.45882352941176469 0.45882352941176469)
- (gray47 0.47058823529411764 0.47058823529411764 0.47058823529411764)
- (grey47 0.47058823529411764 0.47058823529411764 0.47058823529411764)
- (gray48 0.47843137254901963 0.47843137254901963 0.47843137254901963)
- (grey48 0.47843137254901963 0.47843137254901963 0.47843137254901963)
- (gray49 0.49019607843137253 0.49019607843137253 0.49019607843137253)
- (grey49 0.49019607843137253 0.49019607843137253 0.49019607843137253)
- (gray50 0.49803921568627452 0.49803921568627452 0.49803921568627452)
- (grey50 0.49803921568627452 0.49803921568627452 0.49803921568627452)
- (gray51 0.50980392156862742 0.50980392156862742 0.50980392156862742)
- (grey51 0.50980392156862742 0.50980392156862742 0.50980392156862742)
- (gray52 0.52156862745098043 0.52156862745098043 0.52156862745098043)
- (grey52 0.52156862745098043 0.52156862745098043 0.52156862745098043)
- (gray53 0.52941176470588236 0.52941176470588236 0.52941176470588236)
- (grey53 0.52941176470588236 0.52941176470588236 0.52941176470588236)
- (gray54 0.54117647058823526 0.54117647058823526 0.54117647058823526)
- (grey54 0.54117647058823526 0.54117647058823526 0.54117647058823526)
- (gray55 0.5490196078431373 0.5490196078431373 0.5490196078431373)
- (grey55 0.5490196078431373 0.5490196078431373 0.5490196078431373)
- (gray56 0.5607843137254902 0.5607843137254902 0.5607843137254902)
- (grey56 0.5607843137254902 0.5607843137254902 0.5607843137254902)
- (gray57 0.56862745098039214 0.56862745098039214 0.56862745098039214)
- (grey57 0.56862745098039214 0.56862745098039214 0.56862745098039214)
- (gray58 0.58039215686274515 0.58039215686274515 0.58039215686274515)
- (grey58 0.58039215686274515 0.58039215686274515 0.58039215686274515)
- (gray59 0.58823529411764708 0.58823529411764708 0.58823529411764708)
- (grey59 0.58823529411764708 0.58823529411764708 0.58823529411764708)
- (gray60 0.59999999999999998 0.59999999999999998 0.59999999999999998)
- (grey60 0.59999999999999998 0.59999999999999998 0.59999999999999998)
- (gray61 0.61176470588235299 0.61176470588235299 0.61176470588235299)
- (grey61 0.61176470588235299 0.61176470588235299 0.61176470588235299)
- (gray62 0.61960784313725492 0.61960784313725492 0.61960784313725492)
- (grey62 0.61960784313725492 0.61960784313725492 0.61960784313725492)
- (gray63 0.63137254901960782 0.63137254901960782 0.63137254901960782)
- (grey63 0.63137254901960782 0.63137254901960782 0.63137254901960782)
- (gray64 0.63921568627450975 0.63921568627450975 0.63921568627450975)
- (grey64 0.63921568627450975 0.63921568627450975 0.63921568627450975)
- (gray65 0.65098039215686276 0.65098039215686276 0.65098039215686276)
- (grey65 0.65098039215686276 0.65098039215686276 0.65098039215686276)
- (gray66 0.6588235294117647 0.6588235294117647 0.6588235294117647)
- (grey66 0.6588235294117647 0.6588235294117647 0.6588235294117647)
- (gray67 0.6705882352941176 0.6705882352941176 0.6705882352941176)
- (grey67 0.6705882352941176 0.6705882352941176 0.6705882352941176)
- (gray68 0.67843137254901964 0.67843137254901964 0.67843137254901964)
- (grey68 0.67843137254901964 0.67843137254901964 0.67843137254901964)
- (gray69 0.69019607843137254 0.69019607843137254 0.69019607843137254)
- (grey69 0.69019607843137254 0.69019607843137254 0.69019607843137254)
- (gray70 0.70196078431372544 0.70196078431372544 0.70196078431372544)
- (grey70 0.70196078431372544 0.70196078431372544 0.70196078431372544)
- (gray71 0.70980392156862748 0.70980392156862748 0.70980392156862748)
- (grey71 0.70980392156862748 0.70980392156862748 0.70980392156862748)
- (gray72 0.72156862745098038 0.72156862745098038 0.72156862745098038)
- (grey72 0.72156862745098038 0.72156862745098038 0.72156862745098038)
- (gray73 0.72941176470588232 0.72941176470588232 0.72941176470588232)
- (grey73 0.72941176470588232 0.72941176470588232 0.72941176470588232)
- (gray74 0.74117647058823533 0.74117647058823533 0.74117647058823533)
- (grey74 0.74117647058823533 0.74117647058823533 0.74117647058823533)
- (gray75 0.74901960784313726 0.74901960784313726 0.74901960784313726)
- (grey75 0.74901960784313726 0.74901960784313726 0.74901960784313726)
- (gray76 0.76078431372549016 0.76078431372549016 0.76078431372549016)
- (grey76 0.76078431372549016 0.76078431372549016 0.76078431372549016)
- (gray77 0.7686274509803922 0.7686274509803922 0.7686274509803922)
- (grey77 0.7686274509803922 0.7686274509803922 0.7686274509803922)
- (gray78 0.7803921568627451 0.7803921568627451 0.7803921568627451)
- (grey78 0.7803921568627451 0.7803921568627451 0.7803921568627451)
- (gray79 0.78823529411764703 0.78823529411764703 0.78823529411764703)
- (grey79 0.78823529411764703 0.78823529411764703 0.78823529411764703)
- (gray80 0.80000000000000004 0.80000000000000004 0.80000000000000004)
- (grey80 0.80000000000000004 0.80000000000000004 0.80000000000000004)
- (gray81 0.81176470588235294 0.81176470588235294 0.81176470588235294)
- (grey81 0.81176470588235294 0.81176470588235294 0.81176470588235294)
- (gray82 0.81960784313725488 0.81960784313725488 0.81960784313725488)
- (grey82 0.81960784313725488 0.81960784313725488 0.81960784313725488)
- (gray83 0.83137254901960789 0.83137254901960789 0.83137254901960789)
- (grey83 0.83137254901960789 0.83137254901960789 0.83137254901960789)
- (gray84 0.83921568627450982 0.83921568627450982 0.83921568627450982)
- (grey84 0.83921568627450982 0.83921568627450982 0.83921568627450982)
- (gray85 0.85098039215686272 0.85098039215686272 0.85098039215686272)
- (grey85 0.85098039215686272 0.85098039215686272 0.85098039215686272)
- (gray86 0.85882352941176465 0.85882352941176465 0.85882352941176465)
- (grey86 0.85882352941176465 0.85882352941176465 0.85882352941176465)
- (gray87 0.87058823529411766 0.87058823529411766 0.87058823529411766)
- (grey87 0.87058823529411766 0.87058823529411766 0.87058823529411766)
- (gray88 0.8784313725490196 0.8784313725490196 0.8784313725490196)
- (grey88 0.8784313725490196 0.8784313725490196 0.8784313725490196)
- (gray89 0.8901960784313725 0.8901960784313725 0.8901960784313725)
- (grey89 0.8901960784313725 0.8901960784313725 0.8901960784313725)
- (gray90 0.89803921568627454 0.89803921568627454 0.89803921568627454)
- (grey90 0.89803921568627454 0.89803921568627454 0.89803921568627454)
- (gray91 0.90980392156862744 0.90980392156862744 0.90980392156862744)
- (grey91 0.90980392156862744 0.90980392156862744 0.90980392156862744)
- (gray92 0.92156862745098034 0.92156862745098034 0.92156862745098034)
- (grey92 0.92156862745098034 0.92156862745098034 0.92156862745098034)
- (gray93 0.92941176470588238 0.92941176470588238 0.92941176470588238)
- (grey93 0.92941176470588238 0.92941176470588238 0.92941176470588238)
- (gray94 0.94117647058823528 0.94117647058823528 0.94117647058823528)
- (grey94 0.94117647058823528 0.94117647058823528 0.94117647058823528)
- (gray95 0.94901960784313721 0.94901960784313721 0.94901960784313721)
- (grey95 0.94901960784313721 0.94901960784313721 0.94901960784313721)
- (gray96 0.96078431372549022 0.96078431372549022 0.96078431372549022)
- (grey96 0.96078431372549022 0.96078431372549022 0.96078431372549022)
- (gray97 0.96862745098039216 0.96862745098039216 0.96862745098039216)
- (grey97 0.96862745098039216 0.96862745098039216 0.96862745098039216)
- (gray98 0.98039215686274506 0.98039215686274506 0.98039215686274506)
- (grey98 0.98039215686274506 0.98039215686274506 0.98039215686274506)
- (gray99 0.9882352941176471 0.9882352941176471 0.9882352941176471)
- (grey99 0.9882352941176471 0.9882352941176471 0.9882352941176471)
- (gray100 1 1 1)
- (grey100 1 1 1)
- (DarkGrey 0.66274509803921566 0.66274509803921566 0.66274509803921566)
- (DarkGray 0.66274509803921566 0.66274509803921566 0.66274509803921566)
- (DarkBlue 0 0 0.54509803921568623)
- (DarkCyan 0 0.54509803921568623 0.54509803921568623)
- (DarkMagenta 0.54509803921568623 0 0.54509803921568623)
- (DarkRed 0.54509803921568623 0 0)
- (LightGreen 0.56470588235294117 0.93333333333333335 0.56470588235294117)
-
- )))
+(define x11-color-list
+ '((snow 1 0.98039215686274506 0.98039215686274506)
+ (GhostWhite 0.97254901960784312 0.97254901960784312 1)
+ (WhiteSmoke 0.96078431372549022 0.96078431372549022 0.96078431372549022)
+ (gainsboro 0.86274509803921573 0.86274509803921573 0.86274509803921573)
+ (FloralWhite 1 0.98039215686274506 0.94117647058823528)
+ (OldLace 0.99215686274509807 0.96078431372549022 0.90196078431372551)
+ (linen 0.98039215686274506 0.94117647058823528 0.90196078431372551)
+ (AntiqueWhite 0.98039215686274506 0.92156862745098034 0.84313725490196079)
+ (PapayaWhip 1 0.93725490196078431 0.83529411764705885)
+ (BlanchedAlmond 1 0.92156862745098034 0.80392156862745101)
+ (bisque 1 0.89411764705882357 0.7686274509803922)
+ (PeachPuff 1 0.85490196078431369 0.72549019607843135)
+ (NavajoWhite 1 0.87058823529411766 0.67843137254901964)
+ (moccasin 1 0.89411764705882357 0.70980392156862748)
+ (cornsilk 1 0.97254901960784312 0.86274509803921573)
+ (ivory 1 1 0.94117647058823528)
+ (LemonChiffon 1 0.98039215686274506 0.80392156862745101)
+ (seashell 1 0.96078431372549022 0.93333333333333335)
+ (honeydew 0.94117647058823528 1 0.94117647058823528)
+ (MintCream 0.96078431372549022 1 0.98039215686274506)
+ (azure 0.94117647058823528 1 1)
+ (AliceBlue 0.94117647058823528 0.97254901960784312 1)
+ (lavender 0.90196078431372551 0.90196078431372551 0.98039215686274506)
+ (LavenderBlush 1 0.94117647058823528 0.96078431372549022)
+ (MistyRose 1 0.89411764705882357 0.88235294117647056)
+ (white 1 1 1)
+ (black 0 0 0)
+ (DarkSlateGray 0.18431372549019609 0.30980392156862746 0.30980392156862746)
+ (DarkSlateGrey 0.18431372549019609 0.30980392156862746 0.30980392156862746)
+ (DimGray 0.41176470588235292 0.41176470588235292 0.41176470588235292)
+ (DimGrey 0.41176470588235292 0.41176470588235292 0.41176470588235292)
+ (SlateGray 0.4392156862745098 0.50196078431372548 0.56470588235294117)
+ (SlateGrey 0.4392156862745098 0.50196078431372548 0.56470588235294117)
+ (LightSlateGray 0.46666666666666667 0.53333333333333333 0.59999999999999998)
+ (LightSlateGrey 0.46666666666666667 0.53333333333333333 0.59999999999999998)
+ (gray 0.74509803921568629 0.74509803921568629 0.74509803921568629)
+ (grey 0.74509803921568629 0.74509803921568629 0.74509803921568629)
+ (LightGrey 0.82745098039215681 0.82745098039215681 0.82745098039215681)
+ (LightGray 0.82745098039215681 0.82745098039215681 0.82745098039215681)
+ (MidnightBlue 0.098039215686274508 0.098039215686274508 0.4392156862745098)
+ (navy 0 0 0.50196078431372548)
+ (NavyBlue 0 0 0.50196078431372548)
+ (CornflowerBlue 0.39215686274509803 0.58431372549019611 0.92941176470588238)
+ (DarkSlateBlue 0.28235294117647058 0.23921568627450981 0.54509803921568623)
+ (SlateBlue 0.41568627450980394 0.35294117647058826 0.80392156862745101)
+ (MediumSlateBlue 0.4823529411764706 0.40784313725490196 0.93333333333333335)
+ (LightSlateBlue 0.51764705882352946 0.4392156862745098 1)
+ (MediumBlue 0 0 0.80392156862745101)
+ (RoyalBlue 0.25490196078431371 0.41176470588235292 0.88235294117647056)
+ (blue 0 0 1)
+ (DodgerBlue 0.11764705882352941 0.56470588235294117 1)
+ (DeepSkyBlue 0 0.74901960784313726 1)
+ (SkyBlue 0.52941176470588236 0.80784313725490198 0.92156862745098034)
+ (LightSkyBlue 0.52941176470588236 0.80784313725490198 0.98039215686274506)
+ (SteelBlue 0.27450980392156865 0.50980392156862742 0.70588235294117652)
+ (LightSteelBlue 0.69019607843137254 0.7686274509803922 0.87058823529411766)
+ (LightBlue 0.67843137254901964 0.84705882352941175 0.90196078431372551)
+ (PowderBlue 0.69019607843137254 0.8784313725490196 0.90196078431372551)
+ (PaleTurquoise 0.68627450980392157 0.93333333333333335 0.93333333333333335)
+ (DarkTurquoise 0 0.80784313725490198 0.81960784313725488)
+ (MediumTurquoise 0.28235294117647058 0.81960784313725488 0.80000000000000004)
+ (turquoise 0.25098039215686274 0.8784313725490196 0.81568627450980391)
+ (cyan 0 1 1)
+ (LightCyan 0.8784313725490196 1 1)
+ (CadetBlue 0.37254901960784315 0.61960784313725492 0.62745098039215685)
+ (MediumAquamarine 0.40000000000000002 0.80392156862745101 0.66666666666666663)
+ (aquamarine 0.49803921568627452 1 0.83137254901960789)
+ (DarkGreen 0 0.39215686274509803 0)
+ (DarkOliveGreen 0.33333333333333331 0.41960784313725491 0.18431372549019609)
+ (DarkSeaGreen 0.5607843137254902 0.73725490196078436 0.5607843137254902)
+ (SeaGreen 0.1803921568627451 0.54509803921568623 0.3411764705882353)
+ (MediumSeaGreen 0.23529411764705882 0.70196078431372544 0.44313725490196076)
+ (LightSeaGreen 0.12549019607843137 0.69803921568627447 0.66666666666666663)
+ (PaleGreen 0.59607843137254901 0.98431372549019602 0.59607843137254901)
+ (SpringGreen 0 1 0.49803921568627452)
+ (LawnGreen 0.48627450980392156 0.9882352941176471 0)
+ (green 0 1 0)
+ (chartreuse 0.49803921568627452 1 0)
+ (MediumSpringGreen 0 0.98039215686274506 0.60392156862745094)
+ (GreenYellow 0.67843137254901964 1 0.18431372549019609)
+ (LimeGreen 0.19607843137254902 0.80392156862745101 0.19607843137254902)
+ (YellowGreen 0.60392156862745094 0.80392156862745101 0.19607843137254902)
+ (ForestGreen 0.13333333333333333 0.54509803921568623 0.13333333333333333)
+ (OliveDrab 0.41960784313725491 0.55686274509803924 0.13725490196078433)
+ (DarkKhaki 0.74117647058823533 0.71764705882352942 0.41960784313725491)
+ (khaki 0.94117647058823528 0.90196078431372551 0.5490196078431373)
+ (PaleGoldenrod 0.93333333333333335 0.90980392156862744 0.66666666666666663)
+ (LightGoldenrodYellow 0.98039215686274506 0.98039215686274506 0.82352941176470584)
+ (LightYellow 1 1 0.8784313725490196)
+ (yellow 1 1 0)
+ (gold 1 0.84313725490196079 0)
+ (LightGoldenrod 0.93333333333333335 0.8666666666666667 0.50980392156862742)
+ (goldenrod 0.85490196078431369 0.6470588235294118 0.12549019607843137)
+ (DarkGoldenrod 0.72156862745098038 0.52549019607843139 0.043137254901960784)
+ (RosyBrown 0.73725490196078436 0.5607843137254902 0.5607843137254902)
+ (IndianRed 0.80392156862745101 0.36078431372549019 0.36078431372549019)
+ (SaddleBrown 0.54509803921568623 0.27058823529411763 0.074509803921568626)
+ (sienna 0.62745098039215685 0.32156862745098042 0.17647058823529413)
+ (peru 0.80392156862745101 0.52156862745098043 0.24705882352941178)
+ (burlywood 0.87058823529411766 0.72156862745098038 0.52941176470588236)
+ (beige 0.96078431372549022 0.96078431372549022 0.86274509803921573)
+ (wheat 0.96078431372549022 0.87058823529411766 0.70196078431372544)
+ (SandyBrown 0.95686274509803926 0.64313725490196083 0.37647058823529411)
+ (tan 0.82352941176470584 0.70588235294117652 0.5490196078431373)
+ (chocolate 0.82352941176470584 0.41176470588235292 0.11764705882352941)
+ (firebrick 0.69803921568627447 0.13333333333333333 0.13333333333333333)
+ (brown 0.6470588235294118 0.16470588235294117 0.16470588235294117)
+ (DarkSalmon 0.9137254901960784 0.58823529411764708 0.47843137254901963)
+ (salmon 0.98039215686274506 0.50196078431372548 0.44705882352941179)
+ (LightSalmon 1 0.62745098039215685 0.47843137254901963)
+ (orange 1 0.6470588235294118 0)
+ (DarkOrange 1 0.5490196078431373 0)
+ (coral 1 0.49803921568627452 0.31372549019607843)
+ (LightCoral 0.94117647058823528 0.50196078431372548 0.50196078431372548)
+ (tomato 1 0.38823529411764707 0.27843137254901962)
+ (OrangeRed 1 0.27058823529411763 0)
+ (red 1 0 0)
+ (HotPink 1 0.41176470588235292 0.70588235294117652)
+ (DeepPink 1 0.078431372549019607 0.57647058823529407)
+ (pink 1 0.75294117647058822 0.79607843137254897)
+ (LightPink 1 0.71372549019607845 0.75686274509803919)
+ (PaleVioletRed 0.85882352941176465 0.4392156862745098 0.57647058823529407)
+ (maroon 0.69019607843137254 0.18823529411764706 0.37647058823529411)
+ (MediumVioletRed 0.7803921568627451 0.082352941176470587 0.52156862745098043)
+ (VioletRed 0.81568627450980391 0.12549019607843137 0.56470588235294117)
+ (magenta 1 0 1)
+ (violet 0.93333333333333335 0.50980392156862742 0.93333333333333335)
+ (plum 0.8666666666666667 0.62745098039215685 0.8666666666666667)
+ (orchid 0.85490196078431369 0.4392156862745098 0.83921568627450982)
+ (MediumOrchid 0.72941176470588232 0.33333333333333331 0.82745098039215681)
+ (DarkOrchid 0.59999999999999998 0.19607843137254902 0.80000000000000004)
+ (DarkViolet 0.58039215686274515 0 0.82745098039215681)
+ (BlueViolet 0.54117647058823526 0.16862745098039217 0.88627450980392153)
+ (purple 0.62745098039215685 0.12549019607843137 0.94117647058823528)
+ (MediumPurple 0.57647058823529407 0.4392156862745098 0.85882352941176465)
+ (thistle 0.84705882352941175 0.74901960784313726 0.84705882352941175)
+ (snow1 1 0.98039215686274506 0.98039215686274506)
+ (snow2 0.93333333333333335 0.9137254901960784 0.9137254901960784)
+ (snow3 0.80392156862745101 0.78823529411764703 0.78823529411764703)
+ (snow4 0.54509803921568623 0.53725490196078429 0.53725490196078429)
+ (seashell1 1 0.96078431372549022 0.93333333333333335)
+ (seashell2 0.93333333333333335 0.89803921568627454 0.87058823529411766)
+ (seashell3 0.80392156862745101 0.77254901960784317 0.74901960784313726)
+ (seashell4 0.54509803921568623 0.52549019607843139 0.50980392156862742)
+ (AntiqueWhite1 1 0.93725490196078431 0.85882352941176465)
+ (AntiqueWhite2 0.93333333333333335 0.87450980392156863 0.80000000000000004)
+ (AntiqueWhite3 0.80392156862745101 0.75294117647058822 0.69019607843137254)
+ (AntiqueWhite4 0.54509803921568623 0.51372549019607838 0.47058823529411764)
+ (bisque1 1 0.89411764705882357 0.7686274509803922)
+ (bisque2 0.93333333333333335 0.83529411764705885 0.71764705882352942)
+ (bisque3 0.80392156862745101 0.71764705882352942 0.61960784313725492)
+ (bisque4 0.54509803921568623 0.49019607843137253 0.41960784313725491)
+ (PeachPuff1 1 0.85490196078431369 0.72549019607843135)
+ (PeachPuff2 0.93333333333333335 0.79607843137254897 0.67843137254901964)
+ (PeachPuff3 0.80392156862745101 0.68627450980392157 0.58431372549019611)
+ (PeachPuff4 0.54509803921568623 0.46666666666666667 0.396078431372549)
+ (NavajoWhite1 1 0.87058823529411766 0.67843137254901964)
+ (NavajoWhite2 0.93333333333333335 0.81176470588235294 0.63137254901960782)
+ (NavajoWhite3 0.80392156862745101 0.70196078431372544 0.54509803921568623)
+ (NavajoWhite4 0.54509803921568623 0.47450980392156861 0.36862745098039218)
+ (LemonChiffon1 1 0.98039215686274506 0.80392156862745101)
+ (LemonChiffon2 0.93333333333333335 0.9137254901960784 0.74901960784313726)
+ (LemonChiffon3 0.80392156862745101 0.78823529411764703 0.6470588235294118)
+ (LemonChiffon4 0.54509803921568623 0.53725490196078429 0.4392156862745098)
+ (cornsilk1 1 0.97254901960784312 0.86274509803921573)
+ (cornsilk2 0.93333333333333335 0.90980392156862744 0.80392156862745101)
+ (cornsilk3 0.80392156862745101 0.78431372549019607 0.69411764705882351)
+ (cornsilk4 0.54509803921568623 0.53333333333333333 0.47058823529411764)
+ (ivory1 1 1 0.94117647058823528)
+ (ivory2 0.93333333333333335 0.93333333333333335 0.8784313725490196)
+ (ivory3 0.80392156862745101 0.80392156862745101 0.75686274509803919)
+ (ivory4 0.54509803921568623 0.54509803921568623 0.51372549019607838)
+ (honeydew1 0.94117647058823528 1 0.94117647058823528)
+ (honeydew2 0.8784313725490196 0.93333333333333335 0.8784313725490196)
+ (honeydew3 0.75686274509803919 0.80392156862745101 0.75686274509803919)
+ (honeydew4 0.51372549019607838 0.54509803921568623 0.51372549019607838)
+ (LavenderBlush1 1 0.94117647058823528 0.96078431372549022)
+ (LavenderBlush2 0.93333333333333335 0.8784313725490196 0.89803921568627454)
+ (LavenderBlush3 0.80392156862745101 0.75686274509803919 0.77254901960784317)
+ (LavenderBlush4 0.54509803921568623 0.51372549019607838 0.52549019607843139)
+ (MistyRose1 1 0.89411764705882357 0.88235294117647056)
+ (MistyRose2 0.93333333333333335 0.83529411764705885 0.82352941176470584)
+ (MistyRose3 0.80392156862745101 0.71764705882352942 0.70980392156862748)
+ (MistyRose4 0.54509803921568623 0.49019607843137253 0.4823529411764706)
+ (azure1 0.94117647058823528 1 1)
+ (azure2 0.8784313725490196 0.93333333333333335 0.93333333333333335)
+ (azure3 0.75686274509803919 0.80392156862745101 0.80392156862745101)
+ (azure4 0.51372549019607838 0.54509803921568623 0.54509803921568623)
+ (SlateBlue1 0.51372549019607838 0.43529411764705883 1)
+ (SlateBlue2 0.47843137254901963 0.40392156862745099 0.93333333333333335)
+ (SlateBlue3 0.41176470588235292 0.34901960784313724 0.80392156862745101)
+ (SlateBlue4 0.27843137254901962 0.23529411764705882 0.54509803921568623)
+ (RoyalBlue1 0.28235294117647058 0.46274509803921571 1)
+ (RoyalBlue2 0.2627450980392157 0.43137254901960786 0.93333333333333335)
+ (RoyalBlue3 0.22745098039215686 0.37254901960784315 0.80392156862745101)
+ (RoyalBlue4 0.15294117647058825 0.25098039215686274 0.54509803921568623)
+ (blue1 0 0 1)
+ (blue2 0 0 0.93333333333333335)
+ (blue3 0 0 0.80392156862745101)
+ (blue4 0 0 0.54509803921568623)
+ (DodgerBlue1 0.11764705882352941 0.56470588235294117 1)
+ (DodgerBlue2 0.10980392156862745 0.52549019607843139 0.93333333333333335)
+ (DodgerBlue3 0.094117647058823528 0.45490196078431372 0.80392156862745101)
+ (DodgerBlue4 0.062745098039215685 0.30588235294117649 0.54509803921568623)
+ (SteelBlue1 0.38823529411764707 0.72156862745098038 1)
+ (SteelBlue2 0.36078431372549019 0.67450980392156867 0.93333333333333335)
+ (SteelBlue3 0.30980392156862746 0.58039215686274515 0.80392156862745101)
+ (SteelBlue4 0.21176470588235294 0.39215686274509803 0.54509803921568623)
+ (DeepSkyBlue1 0 0.74901960784313726 1)
+ (DeepSkyBlue2 0 0.69803921568627447 0.93333333333333335)
+ (DeepSkyBlue3 0 0.60392156862745094 0.80392156862745101)
+ (DeepSkyBlue4 0 0.40784313725490196 0.54509803921568623)
+ (SkyBlue1 0.52941176470588236 0.80784313725490198 1)
+ (SkyBlue2 0.49411764705882355 0.75294117647058822 0.93333333333333335)
+ (SkyBlue3 0.42352941176470588 0.65098039215686276 0.80392156862745101)
+ (SkyBlue4 0.29019607843137257 0.4392156862745098 0.54509803921568623)
+ (LightSkyBlue1 0.69019607843137254 0.88627450980392153 1)
+ (LightSkyBlue2 0.64313725490196083 0.82745098039215681 0.93333333333333335)
+ (LightSkyBlue3 0.55294117647058827 0.71372549019607845 0.80392156862745101)
+ (LightSkyBlue4 0.37647058823529411 0.4823529411764706 0.54509803921568623)
+ (SlateGray1 0.77647058823529413 0.88627450980392153 1)
+ (SlateGray2 0.72549019607843135 0.82745098039215681 0.93333333333333335)
+ (SlateGray3 0.62352941176470589 0.71372549019607845 0.80392156862745101)
+ (SlateGray4 0.42352941176470588 0.4823529411764706 0.54509803921568623)
+ (LightSteelBlue1 0.792156862745098 0.88235294117647056 1)
+ (LightSteelBlue2 0.73725490196078436 0.82352941176470584 0.93333333333333335)
+ (LightSteelBlue3 0.63529411764705879 0.70980392156862748 0.80392156862745101)
+ (LightSteelBlue4 0.43137254901960786 0.4823529411764706 0.54509803921568623)
+ (LightBlue1 0.74901960784313726 0.93725490196078431 1)
+ (LightBlue2 0.69803921568627447 0.87450980392156863 0.93333333333333335)
+ (LightBlue3 0.60392156862745094 0.75294117647058822 0.80392156862745101)
+ (LightBlue4 0.40784313725490196 0.51372549019607838 0.54509803921568623)
+ (LightCyan1 0.8784313725490196 1 1)
+ (LightCyan2 0.81960784313725488 0.93333333333333335 0.93333333333333335)
+ (LightCyan3 0.70588235294117652 0.80392156862745101 0.80392156862745101)
+ (LightCyan4 0.47843137254901963 0.54509803921568623 0.54509803921568623)
+ (PaleTurquoise1 0.73333333333333328 1 1)
+ (PaleTurquoise2 0.68235294117647061 0.93333333333333335 0.93333333333333335)
+ (PaleTurquoise3 0.58823529411764708 0.80392156862745101 0.80392156862745101)
+ (PaleTurquoise4 0.40000000000000002 0.54509803921568623 0.54509803921568623)
+ (CadetBlue1 0.59607843137254901 0.96078431372549022 1)
+ (CadetBlue2 0.55686274509803924 0.89803921568627454 0.93333333333333335)
+ (CadetBlue3 0.47843137254901963 0.77254901960784317 0.80392156862745101)
+ (CadetBlue4 0.32549019607843138 0.52549019607843139 0.54509803921568623)
+ (turquoise1 0 0.96078431372549022 1)
+ (turquoise2 0 0.89803921568627454 0.93333333333333335)
+ (turquoise3 0 0.77254901960784317 0.80392156862745101)
+ (turquoise4 0 0.52549019607843139 0.54509803921568623)
+ (cyan1 0 1 1)
+ (cyan2 0 0.93333333333333335 0.93333333333333335)
+ (cyan3 0 0.80392156862745101 0.80392156862745101)
+ (cyan4 0 0.54509803921568623 0.54509803921568623)
+ (DarkSlateGray1 0.59215686274509804 1 1)
+ (DarkSlateGray2 0.55294117647058827 0.93333333333333335 0.93333333333333335)
+ (DarkSlateGray3 0.47450980392156861 0.80392156862745101 0.80392156862745101)
+ (DarkSlateGray4 0.32156862745098042 0.54509803921568623 0.54509803921568623)
+ (aquamarine1 0.49803921568627452 1 0.83137254901960789)
+ (aquamarine2 0.46274509803921571 0.93333333333333335 0.77647058823529413)
+ (aquamarine3 0.40000000000000002 0.80392156862745101 0.66666666666666663)
+ (aquamarine4 0.27058823529411763 0.54509803921568623 0.45490196078431372)
+ (DarkSeaGreen1 0.75686274509803919 1 0.75686274509803919)
+ (DarkSeaGreen2 0.70588235294117652 0.93333333333333335 0.70588235294117652)
+ (DarkSeaGreen3 0.60784313725490191 0.80392156862745101 0.60784313725490191)
+ (DarkSeaGreen4 0.41176470588235292 0.54509803921568623 0.41176470588235292)
+ (SeaGreen1 0.32941176470588235 1 0.62352941176470589)
+ (SeaGreen2 0.30588235294117649 0.93333333333333335 0.58039215686274515)
+ (SeaGreen3 0.2627450980392157 0.80392156862745101 0.50196078431372548)
+ (SeaGreen4 0.1803921568627451 0.54509803921568623 0.3411764705882353)
+ (PaleGreen1 0.60392156862745094 1 0.60392156862745094)
+ (PaleGreen2 0.56470588235294117 0.93333333333333335 0.56470588235294117)
+ (PaleGreen3 0.48627450980392156 0.80392156862745101 0.48627450980392156)
+ (PaleGreen4 0.32941176470588235 0.54509803921568623 0.32941176470588235)
+ (SpringGreen1 0 1 0.49803921568627452)
+ (SpringGreen2 0 0.93333333333333335 0.46274509803921571)
+ (SpringGreen3 0 0.80392156862745101 0.40000000000000002)
+ (SpringGreen4 0 0.54509803921568623 0.27058823529411763)
+ (green1 0 1 0)
+ (green2 0 0.93333333333333335 0)
+ (green3 0 0.80392156862745101 0)
+ (green4 0 0.54509803921568623 0)
+ (chartreuse1 0.49803921568627452 1 0)
+ (chartreuse2 0.46274509803921571 0.93333333333333335 0)
+ (chartreuse3 0.40000000000000002 0.80392156862745101 0)
+ (chartreuse4 0.27058823529411763 0.54509803921568623 0)
+ (OliveDrab1 0.75294117647058822 1 0.24313725490196078)
+ (OliveDrab2 0.70196078431372544 0.93333333333333335 0.22745098039215686)
+ (OliveDrab3 0.60392156862745094 0.80392156862745101 0.19607843137254902)
+ (OliveDrab4 0.41176470588235292 0.54509803921568623 0.13333333333333333)
+ (DarkOliveGreen1 0.792156862745098 1 0.4392156862745098)
+ (DarkOliveGreen2 0.73725490196078436 0.93333333333333335 0.40784313725490196)
+ (DarkOliveGreen3 0.63529411764705879 0.80392156862745101 0.35294117647058826)
+ (DarkOliveGreen4 0.43137254901960786 0.54509803921568623 0.23921568627450981)
+ (khaki1 1 0.96470588235294119 0.5607843137254902)
+ (khaki2 0.93333333333333335 0.90196078431372551 0.52156862745098043)
+ (khaki3 0.80392156862745101 0.77647058823529413 0.45098039215686275)
+ (khaki4 0.54509803921568623 0.52549019607843139 0.30588235294117649)
+ (LightGoldenrod1 1 0.92549019607843142 0.54509803921568623)
+ (LightGoldenrod2 0.93333333333333335 0.86274509803921573 0.50980392156862742)
+ (LightGoldenrod3 0.80392156862745101 0.74509803921568629 0.4392156862745098)
+ (LightGoldenrod4 0.54509803921568623 0.50588235294117645 0.29803921568627451)
+ (LightYellow1 1 1 0.8784313725490196)
+ (LightYellow2 0.93333333333333335 0.93333333333333335 0.81960784313725488)
+ (LightYellow3 0.80392156862745101 0.80392156862745101 0.70588235294117652)
+ (LightYellow4 0.54509803921568623 0.54509803921568623 0.47843137254901963)
+ (yellow1 1 1 0)
+ (yellow2 0.93333333333333335 0.93333333333333335 0)
+ (yellow3 0.80392156862745101 0.80392156862745101 0)
+ (yellow4 0.54509803921568623 0.54509803921568623 0)
+ (gold1 1 0.84313725490196079 0)
+ (gold2 0.93333333333333335 0.78823529411764703 0)
+ (gold3 0.80392156862745101 0.67843137254901964 0)
+ (gold4 0.54509803921568623 0.45882352941176469 0)
+ (goldenrod1 1 0.75686274509803919 0.14509803921568629)
+ (goldenrod2 0.93333333333333335 0.70588235294117652 0.13333333333333333)
+ (goldenrod3 0.80392156862745101 0.60784313725490191 0.11372549019607843)
+ (goldenrod4 0.54509803921568623 0.41176470588235292 0.078431372549019607)
+ (DarkGoldenrod1 1 0.72549019607843135 0.058823529411764705)
+ (DarkGoldenrod2 0.93333333333333335 0.67843137254901964 0.054901960784313725)
+ (DarkGoldenrod3 0.80392156862745101 0.58431372549019611 0.047058823529411764)
+ (DarkGoldenrod4 0.54509803921568623 0.396078431372549 0.031372549019607843)
+ (RosyBrown1 1 0.75686274509803919 0.75686274509803919)
+ (RosyBrown2 0.93333333333333335 0.70588235294117652 0.70588235294117652)
+ (RosyBrown3 0.80392156862745101 0.60784313725490191 0.60784313725490191)
+ (RosyBrown4 0.54509803921568623 0.41176470588235292 0.41176470588235292)
+ (IndianRed1 1 0.41568627450980394 0.41568627450980394)
+ (IndianRed2 0.93333333333333335 0.38823529411764707 0.38823529411764707)
+ (IndianRed3 0.80392156862745101 0.33333333333333331 0.33333333333333331)
+ (IndianRed4 0.54509803921568623 0.22745098039215686 0.22745098039215686)
+ (sienna1 1 0.50980392156862742 0.27843137254901962)
+ (sienna2 0.93333333333333335 0.47450980392156861 0.25882352941176473)
+ (sienna3 0.80392156862745101 0.40784313725490196 0.22352941176470589)
+ (sienna4 0.54509803921568623 0.27843137254901962 0.14901960784313725)
+ (burlywood1 1 0.82745098039215681 0.60784313725490191)
+ (burlywood2 0.93333333333333335 0.77254901960784317 0.56862745098039214)
+ (burlywood3 0.80392156862745101 0.66666666666666663 0.49019607843137253)
+ (burlywood4 0.54509803921568623 0.45098039215686275 0.33333333333333331)
+ (wheat1 1 0.90588235294117647 0.72941176470588232)
+ (wheat2 0.93333333333333335 0.84705882352941175 0.68235294117647061)
+ (wheat3 0.80392156862745101 0.72941176470588232 0.58823529411764708)
+ (wheat4 0.54509803921568623 0.49411764705882355 0.40000000000000002)
+ (tan1 1 0.6470588235294118 0.30980392156862746)
+ (tan2 0.93333333333333335 0.60392156862745094 0.28627450980392155)
+ (tan3 0.80392156862745101 0.52156862745098043 0.24705882352941178)
+ (tan4 0.54509803921568623 0.35294117647058826 0.16862745098039217)
+ (chocolate1 1 0.49803921568627452 0.14117647058823529)
+ (chocolate2 0.93333333333333335 0.46274509803921571 0.12941176470588237)
+ (chocolate3 0.80392156862745101 0.40000000000000002 0.11372549019607843)
+ (chocolate4 0.54509803921568623 0.27058823529411763 0.074509803921568626)
+ (firebrick1 1 0.18823529411764706 0.18823529411764706)
+ (firebrick2 0.93333333333333335 0.17254901960784313 0.17254901960784313)
+ (firebrick3 0.80392156862745101 0.14901960784313725 0.14901960784313725)
+ (firebrick4 0.54509803921568623 0.10196078431372549 0.10196078431372549)
+ (brown1 1 0.25098039215686274 0.25098039215686274)
+ (brown2 0.93333333333333335 0.23137254901960785 0.23137254901960785)
+ (brown3 0.80392156862745101 0.20000000000000001 0.20000000000000001)
+ (brown4 0.54509803921568623 0.13725490196078433 0.13725490196078433)
+ (salmon1 1 0.5490196078431373 0.41176470588235292)
+ (salmon2 0.93333333333333335 0.50980392156862742 0.3843137254901961)
+ (salmon3 0.80392156862745101 0.4392156862745098 0.32941176470588235)
+ (salmon4 0.54509803921568623 0.29803921568627451 0.22352941176470589)
+ (LightSalmon1 1 0.62745098039215685 0.47843137254901963)
+ (LightSalmon2 0.93333333333333335 0.58431372549019611 0.44705882352941179)
+ (LightSalmon3 0.80392156862745101 0.50588235294117645 0.3843137254901961)
+ (LightSalmon4 0.54509803921568623 0.3411764705882353 0.25882352941176473)
+ (orange1 1 0.6470588235294118 0)
+ (orange2 0.93333333333333335 0.60392156862745094 0)
+ (orange3 0.80392156862745101 0.52156862745098043 0)
+ (orange4 0.54509803921568623 0.35294117647058826 0)
+ (DarkOrange1 1 0.49803921568627452 0)
+ (DarkOrange2 0.93333333333333335 0.46274509803921571 0)
+ (DarkOrange3 0.80392156862745101 0.40000000000000002 0)
+ (DarkOrange4 0.54509803921568623 0.27058823529411763 0)
+ (coral1 1 0.44705882352941179 0.33725490196078434)
+ (coral2 0.93333333333333335 0.41568627450980394 0.31372549019607843)
+ (coral3 0.80392156862745101 0.35686274509803922 0.27058823529411763)
+ (coral4 0.54509803921568623 0.24313725490196078 0.18431372549019609)
+ (tomato1 1 0.38823529411764707 0.27843137254901962)
+ (tomato2 0.93333333333333335 0.36078431372549019 0.25882352941176473)
+ (tomato3 0.80392156862745101 0.30980392156862746 0.22352941176470589)
+ (tomato4 0.54509803921568623 0.21176470588235294 0.14901960784313725)
+ (OrangeRed1 1 0.27058823529411763 0)
+ (OrangeRed2 0.93333333333333335 0.25098039215686274 0)
+ (OrangeRed3 0.80392156862745101 0.21568627450980393 0)
+ (OrangeRed4 0.54509803921568623 0.14509803921568629 0)
+ (red1 1 0 0)
+ (red2 0.93333333333333335 0 0)
+ (red3 0.80392156862745101 0 0)
+ (red4 0.54509803921568623 0 0)
+ (DeepPink1 1 0.078431372549019607 0.57647058823529407)
+ (DeepPink2 0.93333333333333335 0.070588235294117646 0.53725490196078429)
+ (DeepPink3 0.80392156862745101 0.062745098039215685 0.46274509803921571)
+ (DeepPink4 0.54509803921568623 0.039215686274509803 0.31372549019607843)
+ (HotPink1 1 0.43137254901960786 0.70588235294117652)
+ (HotPink2 0.93333333333333335 0.41568627450980394 0.65490196078431373)
+ (HotPink3 0.80392156862745101 0.37647058823529411 0.56470588235294117)
+ (HotPink4 0.54509803921568623 0.22745098039215686 0.3843137254901961)
+ (pink1 1 0.70980392156862748 0.77254901960784317)
+ (pink2 0.93333333333333335 0.66274509803921566 0.72156862745098038)
+ (pink3 0.80392156862745101 0.56862745098039214 0.61960784313725492)
+ (pink4 0.54509803921568623 0.38823529411764707 0.42352941176470588)
+ (LightPink1 1 0.68235294117647061 0.72549019607843135)
+ (LightPink2 0.93333333333333335 0.63529411764705879 0.67843137254901964)
+ (LightPink3 0.80392156862745101 0.5490196078431373 0.58431372549019611)
+ (LightPink4 0.54509803921568623 0.37254901960784315 0.396078431372549)
+ (PaleVioletRed1 1 0.50980392156862742 0.6705882352941176)
+ (PaleVioletRed2 0.93333333333333335 0.47450980392156861 0.62352941176470589)
+ (PaleVioletRed3 0.80392156862745101 0.40784313725490196 0.53725490196078429)
+ (PaleVioletRed4 0.54509803921568623 0.27843137254901962 0.36470588235294116)
+ (maroon1 1 0.20392156862745098 0.70196078431372544)
+ (maroon2 0.93333333333333335 0.18823529411764706 0.65490196078431373)
+ (maroon3 0.80392156862745101 0.16078431372549021 0.56470588235294117)
+ (maroon4 0.54509803921568623 0.10980392156862745 0.3843137254901961)
+ (VioletRed1 1 0.24313725490196078 0.58823529411764708)
+ (VioletRed2 0.93333333333333335 0.22745098039215686 0.5490196078431373)
+ (VioletRed3 0.80392156862745101 0.19607843137254902 0.47058823529411764)
+ (VioletRed4 0.54509803921568623 0.13333333333333333 0.32156862745098042)
+ (magenta1 1 0 1)
+ (magenta2 0.93333333333333335 0 0.93333333333333335)
+ (magenta3 0.80392156862745101 0 0.80392156862745101)
+ (magenta4 0.54509803921568623 0 0.54509803921568623)
+ (orchid1 1 0.51372549019607838 0.98039215686274506)
+ (orchid2 0.93333333333333335 0.47843137254901963 0.9137254901960784)
+ (orchid3 0.80392156862745101 0.41176470588235292 0.78823529411764703)
+ (orchid4 0.54509803921568623 0.27843137254901962 0.53725490196078429)
+ (plum1 1 0.73333333333333328 1)
+ (plum2 0.93333333333333335 0.68235294117647061 0.93333333333333335)
+ (plum3 0.80392156862745101 0.58823529411764708 0.80392156862745101)
+ (plum4 0.54509803921568623 0.40000000000000002 0.54509803921568623)
+ (MediumOrchid1 0.8784313725490196 0.40000000000000002 1)
+ (MediumOrchid2 0.81960784313725488 0.37254901960784315 0.93333333333333335)
+ (MediumOrchid3 0.70588235294117652 0.32156862745098042 0.80392156862745101)
+ (MediumOrchid4 0.47843137254901963 0.21568627450980393 0.54509803921568623)
+ (DarkOrchid1 0.74901960784313726 0.24313725490196078 1)
+ (DarkOrchid2 0.69803921568627447 0.22745098039215686 0.93333333333333335)
+ (DarkOrchid3 0.60392156862745094 0.19607843137254902 0.80392156862745101)
+ (DarkOrchid4 0.40784313725490196 0.13333333333333333 0.54509803921568623)
+ (purple1 0.60784313725490191 0.18823529411764706 1)
+ (purple2 0.56862745098039214 0.17254901960784313 0.93333333333333335)
+ (purple3 0.49019607843137253 0.14901960784313725 0.80392156862745101)
+ (purple4 0.33333333333333331 0.10196078431372549 0.54509803921568623)
+ (MediumPurple1 0.6705882352941176 0.50980392156862742 1)
+ (MediumPurple2 0.62352941176470589 0.47450980392156861 0.93333333333333335)
+ (MediumPurple3 0.53725490196078429 0.40784313725490196 0.80392156862745101)
+ (MediumPurple4 0.36470588235294116 0.27843137254901962 0.54509803921568623)
+ (thistle1 1 0.88235294117647056 1)
+ (thistle2 0.93333333333333335 0.82352941176470584 0.93333333333333335)
+ (thistle3 0.80392156862745101 0.70980392156862748 0.80392156862745101)
+ (thistle4 0.54509803921568623 0.4823529411764706 0.54509803921568623)
+ (gray0 0 0 0)
+ (grey0 0 0 0)
+ (gray1 0.011764705882352941 0.011764705882352941 0.011764705882352941)
+ (grey1 0.011764705882352941 0.011764705882352941 0.011764705882352941)
+ (gray2 0.019607843137254902 0.019607843137254902 0.019607843137254902)
+ (grey2 0.019607843137254902 0.019607843137254902 0.019607843137254902)
+ (gray3 0.031372549019607843 0.031372549019607843 0.031372549019607843)
+ (grey3 0.031372549019607843 0.031372549019607843 0.031372549019607843)
+ (gray4 0.039215686274509803 0.039215686274509803 0.039215686274509803)
+ (grey4 0.039215686274509803 0.039215686274509803 0.039215686274509803)
+ (gray5 0.050980392156862744 0.050980392156862744 0.050980392156862744)
+ (grey5 0.050980392156862744 0.050980392156862744 0.050980392156862744)
+ (gray6 0.058823529411764705 0.058823529411764705 0.058823529411764705)
+ (grey6 0.058823529411764705 0.058823529411764705 0.058823529411764705)
+ (gray7 0.070588235294117646 0.070588235294117646 0.070588235294117646)
+ (grey7 0.070588235294117646 0.070588235294117646 0.070588235294117646)
+ (gray8 0.078431372549019607 0.078431372549019607 0.078431372549019607)
+ (grey8 0.078431372549019607 0.078431372549019607 0.078431372549019607)
+ (gray9 0.090196078431372548 0.090196078431372548 0.090196078431372548)
+ (grey9 0.090196078431372548 0.090196078431372548 0.090196078431372548)
+ (gray10 0.10196078431372549 0.10196078431372549 0.10196078431372549)
+ (grey10 0.10196078431372549 0.10196078431372549 0.10196078431372549)
+ (gray11 0.10980392156862745 0.10980392156862745 0.10980392156862745)
+ (grey11 0.10980392156862745 0.10980392156862745 0.10980392156862745)
+ (gray12 0.12156862745098039 0.12156862745098039 0.12156862745098039)
+ (grey12 0.12156862745098039 0.12156862745098039 0.12156862745098039)
+ (gray13 0.12941176470588237 0.12941176470588237 0.12941176470588237)
+ (grey13 0.12941176470588237 0.12941176470588237 0.12941176470588237)
+ (gray14 0.14117647058823529 0.14117647058823529 0.14117647058823529)
+ (grey14 0.14117647058823529 0.14117647058823529 0.14117647058823529)
+ (gray15 0.14901960784313725 0.14901960784313725 0.14901960784313725)
+ (grey15 0.14901960784313725 0.14901960784313725 0.14901960784313725)
+ (gray16 0.16078431372549021 0.16078431372549021 0.16078431372549021)
+ (grey16 0.16078431372549021 0.16078431372549021 0.16078431372549021)
+ (gray17 0.16862745098039217 0.16862745098039217 0.16862745098039217)
+ (grey17 0.16862745098039217 0.16862745098039217 0.16862745098039217)
+ (gray18 0.1803921568627451 0.1803921568627451 0.1803921568627451)
+ (grey18 0.1803921568627451 0.1803921568627451 0.1803921568627451)
+ (gray19 0.18823529411764706 0.18823529411764706 0.18823529411764706)
+ (grey19 0.18823529411764706 0.18823529411764706 0.18823529411764706)
+ (gray20 0.20000000000000001 0.20000000000000001 0.20000000000000001)
+ (grey20 0.20000000000000001 0.20000000000000001 0.20000000000000001)
+ (gray21 0.21176470588235294 0.21176470588235294 0.21176470588235294)
+ (grey21 0.21176470588235294 0.21176470588235294 0.21176470588235294)
+ (gray22 0.2196078431372549 0.2196078431372549 0.2196078431372549)
+ (grey22 0.2196078431372549 0.2196078431372549 0.2196078431372549)
+ (gray23 0.23137254901960785 0.23137254901960785 0.23137254901960785)
+ (grey23 0.23137254901960785 0.23137254901960785 0.23137254901960785)
+ (gray24 0.23921568627450981 0.23921568627450981 0.23921568627450981)
+ (grey24 0.23921568627450981 0.23921568627450981 0.23921568627450981)
+ (gray25 0.25098039215686274 0.25098039215686274 0.25098039215686274)
+ (grey25 0.25098039215686274 0.25098039215686274 0.25098039215686274)
+ (gray26 0.25882352941176473 0.25882352941176473 0.25882352941176473)
+ (grey26 0.25882352941176473 0.25882352941176473 0.25882352941176473)
+ (gray27 0.27058823529411763 0.27058823529411763 0.27058823529411763)
+ (grey27 0.27058823529411763 0.27058823529411763 0.27058823529411763)
+ (gray28 0.27843137254901962 0.27843137254901962 0.27843137254901962)
+ (grey28 0.27843137254901962 0.27843137254901962 0.27843137254901962)
+ (gray29 0.29019607843137257 0.29019607843137257 0.29019607843137257)
+ (grey29 0.29019607843137257 0.29019607843137257 0.29019607843137257)
+ (gray30 0.30196078431372547 0.30196078431372547 0.30196078431372547)
+ (grey30 0.30196078431372547 0.30196078431372547 0.30196078431372547)
+ (gray31 0.30980392156862746 0.30980392156862746 0.30980392156862746)
+ (grey31 0.30980392156862746 0.30980392156862746 0.30980392156862746)
+ (gray32 0.32156862745098042 0.32156862745098042 0.32156862745098042)
+ (grey32 0.32156862745098042 0.32156862745098042 0.32156862745098042)
+ (gray33 0.32941176470588235 0.32941176470588235 0.32941176470588235)
+ (grey33 0.32941176470588235 0.32941176470588235 0.32941176470588235)
+ (gray34 0.3411764705882353 0.3411764705882353 0.3411764705882353)
+ (grey34 0.3411764705882353 0.3411764705882353 0.3411764705882353)
+ (gray35 0.34901960784313724 0.34901960784313724 0.34901960784313724)
+ (grey35 0.34901960784313724 0.34901960784313724 0.34901960784313724)
+ (gray36 0.36078431372549019 0.36078431372549019 0.36078431372549019)
+ (grey36 0.36078431372549019 0.36078431372549019 0.36078431372549019)
+ (gray37 0.36862745098039218 0.36862745098039218 0.36862745098039218)
+ (grey37 0.36862745098039218 0.36862745098039218 0.36862745098039218)
+ (gray38 0.38039215686274508 0.38039215686274508 0.38039215686274508)
+ (grey38 0.38039215686274508 0.38039215686274508 0.38039215686274508)
+ (gray39 0.38823529411764707 0.38823529411764707 0.38823529411764707)
+ (grey39 0.38823529411764707 0.38823529411764707 0.38823529411764707)
+ (gray40 0.40000000000000002 0.40000000000000002 0.40000000000000002)
+ (grey40 0.40000000000000002 0.40000000000000002 0.40000000000000002)
+ (gray41 0.41176470588235292 0.41176470588235292 0.41176470588235292)
+ (grey41 0.41176470588235292 0.41176470588235292 0.41176470588235292)
+ (gray42 0.41960784313725491 0.41960784313725491 0.41960784313725491)
+ (grey42 0.41960784313725491 0.41960784313725491 0.41960784313725491)
+ (gray43 0.43137254901960786 0.43137254901960786 0.43137254901960786)
+ (grey43 0.43137254901960786 0.43137254901960786 0.43137254901960786)
+ (gray44 0.4392156862745098 0.4392156862745098 0.4392156862745098)
+ (grey44 0.4392156862745098 0.4392156862745098 0.4392156862745098)
+ (gray45 0.45098039215686275 0.45098039215686275 0.45098039215686275)
+ (grey45 0.45098039215686275 0.45098039215686275 0.45098039215686275)
+ (gray46 0.45882352941176469 0.45882352941176469 0.45882352941176469)
+ (grey46 0.45882352941176469 0.45882352941176469 0.45882352941176469)
+ (gray47 0.47058823529411764 0.47058823529411764 0.47058823529411764)
+ (grey47 0.47058823529411764 0.47058823529411764 0.47058823529411764)
+ (gray48 0.47843137254901963 0.47843137254901963 0.47843137254901963)
+ (grey48 0.47843137254901963 0.47843137254901963 0.47843137254901963)
+ (gray49 0.49019607843137253 0.49019607843137253 0.49019607843137253)
+ (grey49 0.49019607843137253 0.49019607843137253 0.49019607843137253)
+ (gray50 0.49803921568627452 0.49803921568627452 0.49803921568627452)
+ (grey50 0.49803921568627452 0.49803921568627452 0.49803921568627452)
+ (gray51 0.50980392156862742 0.50980392156862742 0.50980392156862742)
+ (grey51 0.50980392156862742 0.50980392156862742 0.50980392156862742)
+ (gray52 0.52156862745098043 0.52156862745098043 0.52156862745098043)
+ (grey52 0.52156862745098043 0.52156862745098043 0.52156862745098043)
+ (gray53 0.52941176470588236 0.52941176470588236 0.52941176470588236)
+ (grey53 0.52941176470588236 0.52941176470588236 0.52941176470588236)
+ (gray54 0.54117647058823526 0.54117647058823526 0.54117647058823526)
+ (grey54 0.54117647058823526 0.54117647058823526 0.54117647058823526)
+ (gray55 0.5490196078431373 0.5490196078431373 0.5490196078431373)
+ (grey55 0.5490196078431373 0.5490196078431373 0.5490196078431373)
+ (gray56 0.5607843137254902 0.5607843137254902 0.5607843137254902)
+ (grey56 0.5607843137254902 0.5607843137254902 0.5607843137254902)
+ (gray57 0.56862745098039214 0.56862745098039214 0.56862745098039214)
+ (grey57 0.56862745098039214 0.56862745098039214 0.56862745098039214)
+ (gray58 0.58039215686274515 0.58039215686274515 0.58039215686274515)
+ (grey58 0.58039215686274515 0.58039215686274515 0.58039215686274515)
+ (gray59 0.58823529411764708 0.58823529411764708 0.58823529411764708)
+ (grey59 0.58823529411764708 0.58823529411764708 0.58823529411764708)
+ (gray60 0.59999999999999998 0.59999999999999998 0.59999999999999998)
+ (grey60 0.59999999999999998 0.59999999999999998 0.59999999999999998)
+ (gray61 0.61176470588235299 0.61176470588235299 0.61176470588235299)
+ (grey61 0.61176470588235299 0.61176470588235299 0.61176470588235299)
+ (gray62 0.61960784313725492 0.61960784313725492 0.61960784313725492)
+ (grey62 0.61960784313725492 0.61960784313725492 0.61960784313725492)
+ (gray63 0.63137254901960782 0.63137254901960782 0.63137254901960782)
+ (grey63 0.63137254901960782 0.63137254901960782 0.63137254901960782)
+ (gray64 0.63921568627450975 0.63921568627450975 0.63921568627450975)
+ (grey64 0.63921568627450975 0.63921568627450975 0.63921568627450975)
+ (gray65 0.65098039215686276 0.65098039215686276 0.65098039215686276)
+ (grey65 0.65098039215686276 0.65098039215686276 0.65098039215686276)
+ (gray66 0.6588235294117647 0.6588235294117647 0.6588235294117647)
+ (grey66 0.6588235294117647 0.6588235294117647 0.6588235294117647)
+ (gray67 0.6705882352941176 0.6705882352941176 0.6705882352941176)
+ (grey67 0.6705882352941176 0.6705882352941176 0.6705882352941176)
+ (gray68 0.67843137254901964 0.67843137254901964 0.67843137254901964)
+ (grey68 0.67843137254901964 0.67843137254901964 0.67843137254901964)
+ (gray69 0.69019607843137254 0.69019607843137254 0.69019607843137254)
+ (grey69 0.69019607843137254 0.69019607843137254 0.69019607843137254)
+ (gray70 0.70196078431372544 0.70196078431372544 0.70196078431372544)
+ (grey70 0.70196078431372544 0.70196078431372544 0.70196078431372544)
+ (gray71 0.70980392156862748 0.70980392156862748 0.70980392156862748)
+ (grey71 0.70980392156862748 0.70980392156862748 0.70980392156862748)
+ (gray72 0.72156862745098038 0.72156862745098038 0.72156862745098038)
+ (grey72 0.72156862745098038 0.72156862745098038 0.72156862745098038)
+ (gray73 0.72941176470588232 0.72941176470588232 0.72941176470588232)
+ (grey73 0.72941176470588232 0.72941176470588232 0.72941176470588232)
+ (gray74 0.74117647058823533 0.74117647058823533 0.74117647058823533)
+ (grey74 0.74117647058823533 0.74117647058823533 0.74117647058823533)
+ (gray75 0.74901960784313726 0.74901960784313726 0.74901960784313726)
+ (grey75 0.74901960784313726 0.74901960784313726 0.74901960784313726)
+ (gray76 0.76078431372549016 0.76078431372549016 0.76078431372549016)
+ (grey76 0.76078431372549016 0.76078431372549016 0.76078431372549016)
+ (gray77 0.7686274509803922 0.7686274509803922 0.7686274509803922)
+ (grey77 0.7686274509803922 0.7686274509803922 0.7686274509803922)
+ (gray78 0.7803921568627451 0.7803921568627451 0.7803921568627451)
+ (grey78 0.7803921568627451 0.7803921568627451 0.7803921568627451)
+ (gray79 0.78823529411764703 0.78823529411764703 0.78823529411764703)
+ (grey79 0.78823529411764703 0.78823529411764703 0.78823529411764703)
+ (gray80 0.80000000000000004 0.80000000000000004 0.80000000000000004)
+ (grey80 0.80000000000000004 0.80000000000000004 0.80000000000000004)
+ (gray81 0.81176470588235294 0.81176470588235294 0.81176470588235294)
+ (grey81 0.81176470588235294 0.81176470588235294 0.81176470588235294)
+ (gray82 0.81960784313725488 0.81960784313725488 0.81960784313725488)
+ (grey82 0.81960784313725488 0.81960784313725488 0.81960784313725488)
+ (gray83 0.83137254901960789 0.83137254901960789 0.83137254901960789)
+ (grey83 0.83137254901960789 0.83137254901960789 0.83137254901960789)
+ (gray84 0.83921568627450982 0.83921568627450982 0.83921568627450982)
+ (grey84 0.83921568627450982 0.83921568627450982 0.83921568627450982)
+ (gray85 0.85098039215686272 0.85098039215686272 0.85098039215686272)
+ (grey85 0.85098039215686272 0.85098039215686272 0.85098039215686272)
+ (gray86 0.85882352941176465 0.85882352941176465 0.85882352941176465)
+ (grey86 0.85882352941176465 0.85882352941176465 0.85882352941176465)
+ (gray87 0.87058823529411766 0.87058823529411766 0.87058823529411766)
+ (grey87 0.87058823529411766 0.87058823529411766 0.87058823529411766)
+ (gray88 0.8784313725490196 0.8784313725490196 0.8784313725490196)
+ (grey88 0.8784313725490196 0.8784313725490196 0.8784313725490196)
+ (gray89 0.8901960784313725 0.8901960784313725 0.8901960784313725)
+ (grey89 0.8901960784313725 0.8901960784313725 0.8901960784313725)
+ (gray90 0.89803921568627454 0.89803921568627454 0.89803921568627454)
+ (grey90 0.89803921568627454 0.89803921568627454 0.89803921568627454)
+ (gray91 0.90980392156862744 0.90980392156862744 0.90980392156862744)
+ (grey91 0.90980392156862744 0.90980392156862744 0.90980392156862744)
+ (gray92 0.92156862745098034 0.92156862745098034 0.92156862745098034)
+ (grey92 0.92156862745098034 0.92156862745098034 0.92156862745098034)
+ (gray93 0.92941176470588238 0.92941176470588238 0.92941176470588238)
+ (grey93 0.92941176470588238 0.92941176470588238 0.92941176470588238)
+ (gray94 0.94117647058823528 0.94117647058823528 0.94117647058823528)
+ (grey94 0.94117647058823528 0.94117647058823528 0.94117647058823528)
+ (gray95 0.94901960784313721 0.94901960784313721 0.94901960784313721)
+ (grey95 0.94901960784313721 0.94901960784313721 0.94901960784313721)
+ (gray96 0.96078431372549022 0.96078431372549022 0.96078431372549022)
+ (grey96 0.96078431372549022 0.96078431372549022 0.96078431372549022)
+ (gray97 0.96862745098039216 0.96862745098039216 0.96862745098039216)
+ (grey97 0.96862745098039216 0.96862745098039216 0.96862745098039216)
+ (gray98 0.98039215686274506 0.98039215686274506 0.98039215686274506)
+ (grey98 0.98039215686274506 0.98039215686274506 0.98039215686274506)
+ (gray99 0.9882352941176471 0.9882352941176471 0.9882352941176471)
+ (grey99 0.9882352941176471 0.9882352941176471 0.9882352941176471)
+ (gray100 1 1 1)
+ (grey100 1 1 1)
+ (DarkGrey 0.66274509803921566 0.66274509803921566 0.66274509803921566)
+ (DarkGray 0.66274509803921566 0.66274509803921566 0.66274509803921566)
+ (DarkBlue 0 0 0.54509803921568623)
+ (DarkCyan 0 0.54509803921568623 0.54509803921568623)
+ (DarkMagenta 0.54509803921568623 0 0.54509803921568623)
+ (DarkRed 0.54509803921568623 0 0)
+ (LightGreen 0.56470588235294117 0.93333333333333335 0.56470588235294117)))
+(define (make-x11-color-handler)
+ (let
+ ((x11-color-table (make-hash-table 31)))
(lambda (arg)
(let*
LOCALSTEPMAKE_TEMPLATES = lilypond
HELP2MAN_EXECS = $(SEXECUTABLES)
+AT_FILES=relocate-preamble
+at-ext=.py.in
+at-dir=$(depth)/python
+
include $(depth)/make/stepmake.make
include $(stepdir)/executable-targets.make
-
program_name = sys.argv[0]
-for d in ['@lilypond_datadir@',
- '@lilypond_libdir@']:
- sys.path.insert (0, os.path.join (d, 'python'))
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-for p in ['share', 'lib']:
- datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
- sys.path.insert (0, datadir)
-
+"""
+@relocate-preamble@
+"""
import lilylib as ly
global _;_=ly._
import string
import re
-
-datadir = '@local_lilypond_datadir@'
-if not os.path.isdir (datadir):
- datadir = '@lilypond_datadir@'
-
-sys.path.insert (0, os.path.join (datadir, 'python'))
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-for p in ['share', 'lib']:
- datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
- sys.path.insert (0, datadir)
+"""
+@relocate-preamble@
+"""
import lilylib as ly
global _;_=ly._
if version == '@' + 'TOPLEVEL_VERSION' + '@':
version = '(unknown version)' # uGUHGUHGHGUGH
-
-################################################################
-# Users of python modules should include this snippet.
-#
-
-
-
-
-for d in ['@lilypond_datadir@',
- '@lilypond_libdir@']:
- sys.path.insert (0, os.path.join (d, 'python'))
-
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-for p in ['share', 'lib']:
- datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
- sys.path.insert (0, datadir)
-
+"""
+@relocate-preamble@
+"""
################################################################
import re
import md5
-################
-# RELOCATION
-################
-
-
-for d in ['@lilypond_datadir@',
- '@lilypond_libdir@']:
- sys.path.insert (0, os.path.join (d, 'python'))
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-
-os.environ['PATH'] = bindir + os.pathsep + os.environ['PATH']
-for p in ['share', 'lib']:
- datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
- sys.path.insert (0, datadir)
-
+"""
+@relocate-preamble@
+"""
import lilylib as ly
import fontextract
import string
import sys
-################################################################
-# Users of python modules should include this snippet.
-#
-
-for d in ['@lilypond_datadir@',
- '@lilypond_libdir@']:
- sys.path.insert (0, os.path.join (d, 'python'))
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-for p in ['share', 'lib']:
- datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
- sys.path.insert (0, datadir)
-
+"""
+@relocate-preamble@
+"""
import midi
import lilylib as ly
################################################################
-################ CONSTANTS
+## CONSTANTS
output_name = ''
import string
from gettext import gettext as _
-
-
-for d in ['@lilypond_datadir@',
- '@lilypond_libdir@']:
- sys.path.insert (0, os.path.join (d, 'python'))
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-for p in ['share', 'lib']:
- datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
- sys.path.insert (0, datadir)
-
-
-
+"""
+@relocate-preamble@
+"""
import lilylib as ly
def print_ly_preamble (printer, filename):
printer.dump_version ()
- printer.print_verbatim ('%% converted from %s\n' % filename)
+ printer.print_verbatim ('%% automatically converted from %s\n' % filename)
def read_musicxml (filename, use_lxml):
if use_lxml:
$(PYTHON) -O -c 'import py_compile; py_compile.compile ("$<")'
$(outdir)/%.py: %.py $(config_make)
- cat $< | sed $(sed-atvariables) > $@
+ cat $< | sed $(sed-atfiles) $(sed-atvariables) > $@
chmod 755 $@
+
$(outdir)/%: %.pl $(config_make) $(depth)/VERSION
- cat $< | sed $(sed-atvariables) > $@
+ cat $< | sed $(sed-atfiles) $(sed-atvariables) > $@
chmod 755 $@
$(outdir)/%: %.bash $(config_make) $(depth)/VERSION
- cat $< | sed $(sed-atvariables) > $@
+ cat $< | sed $(sed-atfiles) $(sed-atvariables) > $@
chmod 755 $@
$(outdir)/%: %.scm $(config_make) $(depth)/VERSION
- cat $< | sed $(sed-atvariables) > $@
+ cat $< | sed $(sed-atfiles) $(sed-atvariables) > $@
chmod 755 $@
$(outdir)/%: %.expect $(config_make) $(depth)/VERSION
- cat $< | sed $(sed-atvariables) > $@
+ cat $< | sed $(sed-atfiles) $(sed-atvariables) > $@
chmod 755 $@
$(outdir)/%: %.sh $(config_make) $(depth)/VERSION
- cat $< | sed $(sed-atvariables) > $@
+ cat $< | sed $(sed-atfiles)$(sed-atvariables) > $@
chmod 755 $@
$(outdir)/%: %.py $(config_make) $(depth)/VERSION
- cat $< | sed $(sed-atvariables) > $@
+ cat $< | sed $(sed-atfiles) $(sed-atvariables) > $@
chmod 755 $@
# for all FILE in AT_FILES:
# substitute occurrences of @FILE@ with contents $(at-dir)BLA$(at-ext)
sed-atfiles = -e '\#' $(foreach i, $(AT_FILES), \
- -e '/@$i@/r $(at-dir)$i$(at-ext)' -e 's%@$i@%%g')
+ -e '/@$i@/r $(at-dir)/$i$(at-ext)' -e 's%@$i@%%g')
# for all VAR in ATVARIABLES
# substitute occurrences of @VAR@ with $(VAR)
sed-atvariables = -e '\#' $(foreach i, $(ATVARIABLES), -e 's!@$i@!$($i)!g')
+