+2004-10-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/stencil-scheme.cc (LY_DEFINE): add ly:stencil-origin
+
2004-10-28 Werner Lemberg <wl@gnu.org>
* Documentation/user/music-glossary.tely: More fixes to improve
return ly_interval2scm (s->extent (Axis (scm_to_int (axis))));
}
+
+LY_DEFINE (ly_stencil_origin, "ly:stencil-origin",
+ 2, 0, 0, (SCM stil, SCM axis),
+ "Return a pair of numbers signifying the origin @var{stil} in "
+ "@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");
+
+ return scm_from_double (s->origin()[Axis (scm_to_int (axis))]);
+}
+
+
LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
4, 2, 0, (SCM first, SCM axis, SCM direction, SCM second,
SCM padding, SCM minimum),
return SCM_UNSPECIFIED;
}
+
if 'stop' in g.repeats:
k = k + ' \\bar ":|" '
- k = '%sglobal = \\notes { %s }\n\n ' % (self.staffid (), k)
+ k = '%sglobal = { %s }\n\n ' % (self.staffid (), k)
return k
def dump (self):
% (self.number, m.number))
if first_frame:
l = self.layerid (x)
- laystr = '%s = \\notes { { %s } }\n\n' % (l, laystr)
+ laystr = '%s = { { %s } }\n\n' % (l, laystr)
str = str + laystr
layerids.append (l)
if item and item.__class__ == Note:
skip = 's'
- s = s + '%s = \\notes' % (track + channel)
+ s = s + '%s = ' % (track + channel)
if not absolute_p:
s = s + '\\relative c '
elif item and item.__class__ == Text:
s = s + '%s = \\lyricmode ' % (track + channel)
else:
skip = '\\skip '
- # must be in \notes mode for parsing \skip
- s = s + '%s = \\notes ' % (track + channel)
+ s = s + '%s = ' % (track + channel)
s = s + '{\n'
s = s + ' ' + dump_channel (channels[i][0], skip)
s = s + '}\n\n'
str = str + ln
id = self.idstring ()
- str = '''%s = \\context Voice = %s \\notes {
+ str = '''%s = \\context Voice = %s {
%s
}
if self.sharps and self.flats:
k = '\\keysignature %s ' % 'TODO'
elif self.sharps:
- k = '\\notes\\key %s \major' % key_sharps[self.sharps]
+ k = '\\key %s \major' % key_sharps[self.sharps]
elif self.flats:
- k = '\\notes\\key %s \major' % key_flats[self.flats]
+ k = '\\key %s \major' % key_flats[self.flats]
return k
class Time: