* scm/define-markup-commands.scm: remove split around-space hack.
* lily/staff-symbol-referencer.cc (get_rounded_position): new
function, fold WL's fixes into one function.
+2004-03-22 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/text-item.cc (interpret_markup): idem.
+
+ * scm/define-markup-commands.scm: remove split around-space hack.
+
+ * lily/staff-symbol-referencer.cc (get_rounded_position): new
+ function, fold WL's fixes into one function.
+
2004-03-22 Werner Lemberg <wl@gnu.org>
lily/stem.cc (Stem::extremal_heads, Stem::note_head_positions),
2004-03-21 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * VERSION: 2.1.33 released.
+
* scripts/lilypond-book.py (do_file): reinstate --filter support.
* buildscripts/mf-to-table.py (base): use %d for TfmCheckSum
* lily/tie-performer.cc (acknowledge_audio_element): bugfix: use
and init ties_created_
+ * VERSION: release 2.1.32
+
* lily/include/music-iterator.hh (IMPLEMENT_CTOR_CALLBACK): remove
doc string from IMPLEMENT_CTOR_CALLBACK().
MAJOR_VERSION=2
MINOR_VERSION=1
PATCH_LEVEL=33
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=hwn1
Direction neutral_direction =
to_dir (me->get_property ("neutral-direction"));
- int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+ int pos = (int)Staff_symbol_referencer::get_rounded_position (me);
int sz = Staff_symbol_referencer::line_count (me)-1;
String font_char = "custodes-" + style + "-";
else
{
// add ledger lines
- int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+ int pos = Staff_symbol_referencer::get_rounded_position (me);
int interspaces = Staff_symbol_referencer::line_count (me)-1;
if (abs (pos) - interspaces > 1)
{
dp.extremal_head_ = Stem::first_head (stem) == note;
}
- int p = (int)rint (Staff_symbol_referencer::get_position (dp.dot_));
+ int p = Staff_symbol_referencer::get_rounded_position (dp.dot_);
dp.pos_= p;
if (dp.extremal_head_)
static int line_count (Grob*);
static Real get_position (Grob*);
static Real staff_radius (Grob*);
+ static int get_rounded_position (Grob*me);
};
int compare_position (Grob *const&,Grob *const&);
out.add_stencil (join);
}
- int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+ int pos = Staff_symbol_referencer::get_rounded_position (me);
add_ledger_lines (me, &out, pos, 0, ledger_take_space);
if (primitive & MLP_FLEXA)
{
{
Grob *se = unsmob_grob (ly_car (h));
- int j = (int)rint (Staff_symbol_referencer::get_position (se));
+ int j = Staff_symbol_referencer::get_rounded_position (se);
iv.unite (Slice (j,j));
}
return iv;
}
int interspaces = Staff_symbol_referencer::line_count (me)-1;
- int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+ int pos = Staff_symbol_referencer::get_rounded_position (me);
if (with_ledgers && interspaces >= 0
&& abs (pos) - interspaces > 1)
{
Box bx (Interval (0, 1.0), Interval (-0.5, 0.5));
Stencil m (bx, at);
- int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+ int pos = Staff_symbol_referencer::get_rounded_position (me);
int interspaces = Staff_symbol_referencer::line_count (me)-1;
if (abs (pos) - interspaces > 1)
{
/*
This is an almost empty thing. The only substantial thing this class
- handles, is scaling up and down to real-world dimensions (internally
+ handles is scaling up and down to real-world dimensions (internally
dimensions are against global staff-space.)
-
*/
+
Paper_def::Paper_def ()
{
}
return scm_gc_unprotect_object (trans->self_scm ());
}
-// FIXME: silly name, score/music is rendered, not the output -- render midi?
-LY_DEFINE (ly_render_output, "ly:render-output",
+LY_DEFINE (ly_format_output, "ly:format-output",
2, 0, 0, (SCM context, SCM outname),
"Given a Score context in its final state,"
"process it and return the (rendered) result.")
if (Global_context *g = dynamic_cast<Global_context*>
(unsmob_context (context)))
{
- SCM systems = ly_render_output (context, outname);
+ SCM systems = ly_format_output (context, outname);
Music_output *output = g->get_output ();
if (systems != SCM_UNDEFINED)
{
return robust_scm2double (me->get_property ("staff-position"), p);
}
+int
+Staff_symbol_referencer::get_rounded_position (Grob*me)
+{
+ return int (rint (get_position (me)));
+}
LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
1, 0,0, (SCM sg),
"in their @code{Y-offset-callbacks}. "
,
"staff-position");
+
Grob * n = unsmob_grob (ly_car (s));
- int p = (int)rint (Staff_symbol_referencer::get_position (n));
+ int p = Staff_symbol_referencer::get_rounded_position (n);
Direction d = LEFT;
do {
for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s))
{
Grob * n = unsmob_grob (ly_car (s));
- int p = (int)rint (Staff_symbol_referencer::get_position (n));
+ int p = Staff_symbol_referencer::get_rounded_position (n);
ps.push (p);
}
--hwn.
*/
- int p = (int)rint (Staff_symbol_referencer::get_position (first_head (me)));
+ int p = Staff_symbol_referencer::get_rounded_position (me);
staffline_offs = Staff_symbol_referencer::on_staffline (me, p) ?
"1" : "0";
}
if (gh_string_p (markup))
{
String str = ly_scm2string (markup);
- if (str.index_any (" \t\n\r") != -1)
- {
- /* Multi word string to line markup. */
- SCM proc= ly_scheme_function ("make-simple-markup");
- return interpret_markup (paper, props, scm_call_1 (proc, markup));
- }
-
- /* Simple word. */
+
Paper_def *pap = unsmob_paper (paper);
Font_metric *fm = select_font (pap, props);
SCM lst = scm_list_n (ly_symbol2scm ("text"), markup, SCM_UNDEFINED);
Real blotdiameter =
(me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
- int pos = (int)rint (Staff_symbol_referencer::get_position (me));
+ int pos = Staff_symbol_referencer::get_rounded_position (me);
SCM delta_pitch_scm = me->get_property ("delta-pitch");
int delta_pitch;
"A simple text-string; @code{\\markup @{ foo @}} is equivalent with
@code{\\markup @{ \\simple #\"foo\" @}}."
(interpret-markup paper props
- (make-line-markup
- (map make-word-markup (string-tokenize str)))))
+ (make-word-markup str)))
+
+; todo: use font recoding.
+; (make-line-markup
+; (map make-word-markup (string-tokenize str)))))
(define-public empty-markup
(make-simple-markup ""))