+2005-04-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/tie.cc (print): idem.
+
+ * lily/slur.cc (print): don't use thickness property for
+ slur shape-thickness.
+
+ * lily/stencil-scheme.cc (LY_DEFINE): don't reverse the order
+ while adding stencils.
+
+ * scm/define-markup-commands.scm (with-color): with-color markup
+ command.
+ (whiteout): new markup command
+ (filled-box): new markup command
+
2005-04-07 Jan Nieuwenhuizen <janneke@gnu.org>
* Documentation/topdocs/NEWS.tely (Top): Make tex-able. Handy
\version "2.4.0"
\header
{
- texidoc= "Quarter notes may be beamed: the beam is halted momentarily."
+ texidoc= "Quarter notes may be beamed: the beam is halted momentarily."
}
-\score { \relative c'' {
- c8[ c4 c8] % should warn here!
-}
-\layout { raggedright = ##t}
+\score {
+ \relative c'' {
+ c8[ c4 c8] % should warn here!
+ }
+ \layout { raggedright = ##t }
}
\score {
{
- f'-\markup {
+ f'1-\markup {
foo
\raise #0.2 \hbracket \bold bar
\override #'(baseline-skip . 4)
\combine "X" "+"
\combine "o" "/"
+ }
+ g'1-\markup {
% \char-number #"abc1234abc"
\box \column { \line { "string 1" } \line { "string 2" } }
"$\\emptyset$"
\italic Norsk
\super "2"
" "
+ \raise #3.0 \whiteout white-out
\circle \dynamic p
+ \with-color #green Green
\dynamic sfzp
\huge { "A" \smaller "A" \smaller \smaller "A"
\smaller \smaller \smaller "A" }
--- /dev/null
+\header {
+
+ texidoc = "The whiteout command underlays a white box under a
+markup. The whitening effect only is only guaranteed for staff lines,
+since staff lines are in a different layer. "
+
+}
+\version "2.5.18"
+
+\paper
+{
+ raggedright = ##t
+}
+
+{
+ \override TextScript #'extra-offset = #'(2 . 4)
+ c'4-\markup { \whiteout foo } c
+}
return SCM_EOL;
}
+ Real staff_thick = Staff_symbol_referencer::line_thickness (me);
Real base_thick = robust_scm2double (me->get_property ("thickness"), 1);
- Real thick = base_thick * Staff_symbol_referencer::line_thickness (me);
+ Real thick = base_thick * staff_thick;
Real ss = Staff_symbol_referencer::staff_space (me);
Bezier one = get_curve (me);
a = Lookup::dashed_slur (one, thick, robust_scm2double (p, 1.0),
robust_scm2double (f, 0));
else
- a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0,
+ a = Lookup::slur (one,
+ get_grob_direction (me) * staff_thick * 1.0,
thick);
#if DEBUG_SLUR_SCORING
#define FUNC_NAME __FUNCTION__
SCM_VALIDATE_REST_ARGUMENT (args);
- Stencil result;
-
+ SCM expr = SCM_EOL;
+ SCM *tail = &expr;
+ Box extent;
+ extent.set_empty ();
+
while (!SCM_NULLP (args))
{
Stencil *s = unsmob_stencil (scm_car (args));
if (!s)
SCM_ASSERT_TYPE (s, scm_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
- result.add_stencil (*s);
+
+ extent.unite (s->extent_box ());
+ *tail = scm_cons (s->expr (), SCM_EOL);
+ tail = SCM_CDRLOC (*tail);
args = scm_cdr (args);
}
- return result.smobbed_copy ();
+ expr = scm_cons (ly_symbol2scm ("combine-stencil"), expr);
+ return Stencil (extent, expr).smobbed_copy ();
}
LY_DEFINE (ly_make_stencil, "ly:make-stencil",
if (!scm_is_pair (cp))
return Stencil ().smobbed_copy ();
- Real thick
- = Staff_symbol_referencer::line_thickness (me)
- * robust_scm2double (me->get_property ("thickness"), 1);
+
+ Real staff_thick = Staff_symbol_referencer::line_thickness (me);
+ Real base_thick = robust_scm2double (me->get_property ("thickness"), 1);
+ Real thick = base_thick * staff_thick;
+
Bezier b;
int i = 0;
i++;
}
- Stencil a = Lookup::slur (b, get_grob_direction (me) * thick, thick);
+ Stencil a = Lookup::slur (b,
+ get_grob_direction (me) * staff_thick,
+ thick);
return a.smobbed_copy ();
}
(PhrasingSlur
. ((slur-details . ,default-slur-details)
(print-function . ,Slur::print)
- (thickness . 1.2)
+ (thickness . 1.1)
(spacing-procedure . ,Spanner::set_spacing_rods)
(minimum-length . 1.5)
(after-line-breaking-callback . ,Slur::after_line_breaking)
(Slur
. ((slur-details . ,default-slur-details)
(print-function . ,Slur::print)
- (thickness . 1.2)
+ (thickness . 1.0)
(spacing-procedure . ,Spanner::set_spacing_rods)
(minimum-length . 1.5)
(after-line-breaking-callback . ,Slur::after_line_breaking)
(spacing-procedure . ,Spanner::set_spacing_rods)
(staffline-clearance . 0.35)
(details . ((ratio . 0.333) (height-limit . 1.0)))
- (thickness . 1.2)
+ (thickness . 1.0)
(x-gap . -0.1)
(y-offset . 0.6)
(minimum-length . 2.5)
"Draw a double flat symbol."
(interpret-markup layout props (markup #:musicglyph "accidentals.M4")))
+(def-markup-command (with-color layout props color arg) (color? markup?)
+ "Draw @var{arg} in color specified by @var{color}"
+
+ (let* ((stil (interpret-markup layout props arg)))
+
+ (ly:make-stencil (list 'color color (ly:stencil-expr stil))
+ (ly:stencil-extent stil X)
+ (ly:stencil-extent stil Y))))
;;
;; TODO: should extract baseline-skip from each argument somehow..
(ly:stencil-translate-axis stack 0.75 Y))))
+
+(def-markup-command (filled-box layout props xext yext blot)
+ (number-pair? number-pair? number?)
+ "Draw a box with rounded corners of dimensions @var{xext} and @var{yext}."
+ (ly:round-filled-box
+ xext yext blot))
+
+(def-markup-command (whiteout layout props arg) (markup?)
+ "Provide a white underground for @var{arg}"
+ (let* ((stil (interpret-markup layout props
+ (make-with-color-markup black arg)))
+ (white
+ (interpret-markup layout props
+ (make-with-color-markup
+ white
+ (make-filled-box-markup
+ (ly:stencil-extent stil X)
+ (ly:stencil-extent stil Y)
+ 0.0)))))
+
+ (ly:stencil-add white stil)))
+
;; TODO: better syntax.
(def-markup-command (note-by-number layout props log dot-count dir) (number? number? number?)
(if (not (ly:get-option 'verbose))
(begin
(format (current-error-port)
- (_ "Converting to `~a'...") (string-append base ".psbl"))
+ (_ "Converting to `~a'...") (string-append base ".ps"))
(newline (current-error-port))))
(ly:system cmd)))