if existing and not empty. Fixes spurious programming error.
* lily/span-bar.cc (print): don't make rounded edges for spanbars.
+2005-03-31 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/page-layout.scm (default-page-make-stencil): only add header
+ if existing and not empty. Fixes spurious programming error.
+
+ * lily/span-bar.cc (print): don't make rounded edges for spanbars.
+
2005-03-31 Erlend Aasland <erlenda@gmail.com>
* scm/output-tex.scm: implement {re,}setcolor
if (sz <= 0)
return SCM_EOL;
- return compound_barline (me, str, sz).smobbed_copy ();
+ return compound_barline (me, str, sz, true).smobbed_copy ();
}
return SCM_EOL;
}
Stencil
-Bar_line::compound_barline (Grob *me, String str, Real h)
+Bar_line::compound_barline (Grob *me, String str, Real h,
+ bool rounded)
{
Real kern = robust_scm2double (me->get_property ("kern"), 1);
Real thinkern = robust_scm2double (me->get_property ("thin-kern"), 1);
hair *= staffline;
fatline *= staffline;
- Stencil thin = simple_barline (me, hair, h);
- Stencil thick = simple_barline (me, fatline, h);
+ Stencil thin = simple_barline (me, hair, h, rounded);
+ Stencil thick = simple_barline (me, fatline, h, rounded);
Stencil dot = Font_interface::get_default_font (me)->find_by_name ("dots.dot");
int lines = Staff_symbol_referencer::line_count (me);
Stencil
Bar_line::simple_barline (Grob *me,
Real w,
- Real h)
+ Real h,
+ bool rounded)
{
- Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blot =
+ rounded
+ ? me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"))
+ : 0.0;
return Lookup::round_filled_box (Box (Interval (0, w), Interval (-h / 2, h / 2)), blot);
}
public:
static bool has_interface (Grob *);
- static Stencil compound_barline (Grob *, String, Real height);
- static Stencil simple_barline (Grob *, Real wid, Real height);
+ static Stencil compound_barline (Grob *, String, Real height, bool rounded);
+ static Stencil simple_barline (Grob *, Real wid, Real height, bool rounded);
DECLARE_SCHEME_CALLBACK (get_staff_bar_size, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
{
Stencil interbar = Bar_line::compound_barline (staff_bar,
glyph_string,
- l.length ());
+ l.length (),
+ false);
interbar.translate_axis (l.center (), Y_AXIS);
span_bar_mol.add_stencil (interbar);
}
/*
urg.
*/
- Stencil m = Bar_line::compound_barline (se, gl, 40 PT);
+ Stencil m = Bar_line::compound_barline (se, gl, 40 PT, false);
return ly_interval2scm (m.extent (X_AXIS));
}
SCM_ASSERT_TYPE (scm_is_number (amount), amount, SCM_ARG2, __FUNCTION__, "number");
Real real_amount = scm_to_double (amount);
+
#if 0
SCM_ASSERT_TYPE (!isinf (real_amount) && !isnan (real_amount),
amount, SCM_ARG2, __FUNCTION__, "finite number");
;;;; * text setting, kerning.
;;;; * document output-interface
-(debug-enable 'backtrace)
-
(define-module (scm output-ps)
#:re-export (quote)
;;;; * inkscape SVG-font support
;;;; - use fontconfig/fc-cache for now, see output-gnome.scm
-(debug-enable 'backtrace)
(define-module (scm output-svg))
(define this-module (current-module))
;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;; (debug-enable 'backtrace)
-
;; The public interface is tight.
;; It has to be, because user-code is evalled with this module.
Offsets is a list of increasing numbers. They must be negated to
create offsets.
"
+
(let* ((topmargin (ly:output-def-lookup layout 'topmargin))
;; TODO: naming vsize/hsize not analogous to TeX.
(if #f
(display (list
- "leftmargin" leftmargin "rightmargin" rightmargin)))
+ "leftmargin " leftmargin "rightmargin " rightmargin
+ )))
- (set! page-stencil (ly:stencil-combine-at-edge
- page-stencil Y DOWN head 0. 0.))
+ (if (and
+ (ly:stencil? head)
+ (not (ly:stencil-empty? head)))
+ (set! page-stencil (ly:stencil-combine-at-edge
+ page-stencil Y DOWN head 0. 0.)))
(map add-system (zip lines offsets))
- (if (ly:stencil? foot)
+ (if (and (ly:stencil? foot)
+ (not (ly:stencil-empty? foot)))
(set! page-stencil
(ly:stencil-add
page-stencil