should be taken without child context.
* ly/chord-modifiers-init.ly (blackTriangleMarkup): use it.
* scm/define-markup-commands.scm (triangle): new command, as
robust replacement for unicode Delta/Triangle.
+2005-05-04 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/context-def.cc (path_to_acceptable_context): bugfix, depth
+ should be taken without child context.
+
+ * ly/chord-modifiers-init.ly (blackTriangleMarkup): use it.
+
+ * scm/define-markup-commands.scm (triangle): new command, as
+ robust replacement for unicode Delta/Triangle.
+
2005-05-03 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * ps/music-drawing-routines.ps: add fillp argument.
+
+ * lily/lookup.cc (round_filled_polygon): polygon takes filled? argument
+
* lily/font-config.cc (init_fontconfig): don't add cff/
* VERSION (PACKAGE_NAME): release 2.5.22
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=5
-PATCH_LEVEL=22
+PATCH_LEVEL=23
MY_PATCH_LEVEL=
+++ /dev/null
-#!@PYTHON@
-import sys
-
-file = sys.argv[1]
-font_set_name = sys.argv[2]
-output = sys.argv[3]
-body = open (file).read()
-body_length = len (body)
-version = '0'
-binary_data = "/%(font_set_name)s %(body_length)d StartData " % vars() \
- + body
-binary_length = len (binary_data)
-
-header = r"""%%%%BeginResource: font %(font_set_name)s
-%%!PS-Adobe-3.0 Resource-FontSet
-%%%%DocumentNeededResources: ProcSet (FontSetInit)
-%%%%Title: (FontSet/%(font_set_name)s)
-%%%%Version: %(version)s
-%%%%EndComments
-%%%%IncludeResource: ProcSet (FontSetInit)
-%%%%BeginResource: FontSet (%(font_set_name)s)
-/FontSetInit /ProcSet findresource begin
-%%%%BeginData: %(binary_length)d Binary Bytes
-""" % vars()
-
-
-footer = """\n%%%%EndData
-%%%%EndResource
-%%%%EOF
-%%%%EndResource\n""" % vars()
-
-fo = open (output,'w')
-fo.write (header)
-fo.write (binary_data)
-fo.write (footer)
= g->path_to_acceptable_context (type_sym, odef);
if (result.size () && result.size () < best_depth)
{
+ best_depth = result.size ();
result.insert (g, 0);
best_result = result;
-
- /* this following line was added in 1.9.3, but hsould've been
- there all along... Let's hope it doesn't cause nightmares. */
- best_depth = result.size ();
}
}
SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
ly_quote_scm (shrinked_points_scm),
scm_make_real (blotdiameter),
+ SCM_BOOL_T,
SCM_UNDEFINED);
Stencil polygon = Stencil (box, polygon_scm);
whiteTriangleMarkup = \markup {
+ \triangle ##f
%% 394 capital delta
- #(ly:export (ly:wide-char->utf-8 #x0394))
+ %#(ly:export (ly:wide-char->utf-8 #x0394))
%% 2206 : delta from the symbol font.
% #(ly:export (ly:wide-char->utf-8 #x2206))
}
blackTriangleMarkup = \markup {
+ \triangle ##t
%% black up pointing triangle
- #(ly:export (ly:wide-char->utf-8 #x25B2))
+% #(ly:export (ly:wide-char->utf-8 #x25B2))
}
ignatzekExceptionMusic = {
\context {
\type Score_engraver
- \name Score
+ \name "Score"
\description "This is the top level notation context. No
other context can contain a @code{Score} context. This context
\defaultchild "Staff"
\accepts "Staff"
- \accepts "TabStaff"
+ \accepts "RhythmicStaff"
+%{ \accepts "TabStaff"
\accepts "VaticanaStaff"
\accepts "GregorianTranscriptionStaff"
\accepts "MensuralStaff"
\accepts "StaffGroup"
- \accepts "RhythmicStaff"
\accepts "DrumStaff"
\accepts "Lyrics"
\accepts "ChordNames"
\accepts "Devnull"
\accepts "NoteNames"
\accepts "FiguredBass"
-
+%}
soloText = #"Solo"
soloIIText = #"Solo II"
aDueText = #"a2"
} ifelse
} bind def
-/draw_polygon % x(n) y(n) x(n-1) y(n-1) ... x(1) y(1) n blot
+/draw_polygon % x(n) y(n) x(n-1) y(n-1) ... x(1) y(1) n blot fill
{
+ /fillp exch def
/blot exch def
0 setlinecap
/points exch def
2 copy
moveto
- 1 1 points {pop lineto} for
- currentdict /testing known {
- %% outline only, for testing:
- stroke
+ 1 1 points { pop lineto } for
+ closepath
+ fillp {
+ gsave stroke grestore fill
}{
- closepath gsave stroke grestore fill
+ stroke
} ifelse
} bind def
optionally filled."
(make-circle-stencil radius thickness fill))
+(def-markup-command (triangle layout props filled) (boolean?)
+ "A triangle, filled or not"
+ (let*
+ ((th (chain-assoc-get 'thickness props 0.1))
+ (size (chain-assoc-get 'font-size props 0))
+ (ex (* (magstep size)
+ 0.8
+ (chain-assoc-get 'baseline-skip props 2))))
+
+ (ly:make-stencil
+ `(polygon '(0.0 0.0
+ ,ex 0.0
+ ,(* 0.5 ex)
+ ,(* 0.86 ex))
+ ,th
+ ,filled)
+
+ (cons 0 ex)
+ (cons 0 (* .86 ex))
+ )))
+
(def-markup-command (circle layout props arg) (markup?)
"Draw a circle around @var{arg}. Use @code{thickness},
@code{circle-padding} and @code{font-size} properties to determine line
(string-append
(ly:number->string x) " " (ly:number->string y) " { " s " } place-box\n"))
-(define (polygon points blotdiameter)
+(define (polygon points blotdiameter filled?)
(string-append
(ly:numbers->string points) " "
(ly:number->string (/ (length points) 2)) " "
(ly:number->string blotdiameter)
+ (if filled? " true " " false ")
" draw_polygon"))
(define (repeat-slash wid slope thick)
(define (resetcolor)
(string-append "\\color[rgb]{0,0,0}\n"))
-(define (polygon points blotdiameter)
- (embedded-ps (list 'polygon `(quote ,points) blotdiameter)))
+(define (polygon points blotdiameter fill)
+ (embedded-ps (list 'polygon `(quote ,points) blotdiameter fill)))
(define (draw-line thick fx fy tx ty)
(embedded-ps (list 'draw-line thick fx fy tx ty)))