degenerate case.
+2006-01-31 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/beam.cc (calc_direction): take dir from visible stem in
+ degenerate case.
+
2006-01-31 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/melody-spanner.cc (spanner::calc_neutral_stem_direction):
This rewrite was sponsored by Trent Johnston.
@item String arguments for music functions may be specified without
-@code{#} marks. This allows syntactical constructs (like \clef and
-\bar) to be expressed in generic music functions.
+@code{#} marks. Now, \clef and \bar are also music functions.
@item Ties in chords are also formatted using a scoring based
formatting. This reduces the number of collisions for ties in chords,
Jukka Akkanen
Lambros Lambrou
Laura Conrad
+Mark Steinhauser
Matevž Jekovec
Michael Welsh Duggan
Milan Zamazal
me->suicide ();
return SCM_UNSPECIFIED;
}
- else
+ else
{
- d = to_dir (stems[0]->get_property ("default-direction"));
+ Grob *stem = first_visible_stem (me);
+ d = to_dir (stem->get_property ("default-direction"));
}
}
-
if (count >= 1)
{
- d = get_default_dir (me);
+ if (!d)
+ d = get_default_dir (me);
+
consider_auto_knees (me);
}
@var{size}."
(if (ly:get-option 'safe)
- (interpret-markup layout props "not allowed in safe")
- (let*
- ((contents (ly:gulp-file file-name))
- (bbox (get-postscript-bbox contents))
- (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)))
-
- (if bbox
- (ly:make-stencil
- (list
- 'embedded-ps
- (format
-
- "BeginEPSF
-~a ~a scale
-%%BeginDocument: ~a
-~a
-%%EndDocument
-EndEPSF"
- factor factor
- file-name
- contents))
- (cons (list-ref scaled-bbox 0) (list-ref scaled-bbox 2))
- (cons (list-ref scaled-bbox 1) (list-ref scaled-bbox 3)))
-
- (ly:make-stencil "" '(0 . 0) '(0 . 0)))
- )))
-
+ (interpret-markup layout props "not allowed in safe")
+ (eps-file->stencil axis size file-name)
+ ))
(def-markup-command (postscript layout props str) (string?)
"This inserts @var{str} directly into the output as a PostScript
(ly:number->string y2) " lineto stroke"))
(define (embedded-ps string)
+ (display (list "len " (string-length string) "\n"))
string)
-
(define (glyph-string
postscript-font-name
size cid?
(ly:stencil-extent annotation X)
(cons 10000 -10000)))
annotation))
+
+
+(define-public (eps-file->stencil axis size file-name)
+ (let*
+ ((contents (ly:gulp-file file-name))
+ (bbox (get-postscript-bbox contents))
+ (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)))
+
+ (if bbox
+ (ly:make-stencil
+ (list
+ 'embedded-ps
+ (string-append
+ (format
+ "BeginEPSF
+~a ~a scale
+%%BeginDocument: ~a
+" factor factor
+ file-name
+ )
+ contents
+ "%%EndDocument
+EndEPSF"))
+
+ (cons (list-ref scaled-bbox 0) (list-ref scaled-bbox 2))
+ (cons (list-ref scaled-bbox 1) (list-ref scaled-bbox 3)))
+
+ (ly:make-stencil "" '(0 . 0) '(0 . 0)))
+ ))