Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(106)

Side by Side Diff: lily/bar-line.cc

Issue 181144: Issue 659: alternate segno symbol (Closed)
Patch Set: First update: changing segno marker to S Created 15 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl> 4 Copyright (C) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
5 5
6 LilyPond is free software: you can redistribute it and/or modify 6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 Real center = 0; 109 Real center = 0;
110 if (staff) 110 if (staff)
111 { 111 {
112 Interval staff_extent = staff->extent (staff, Y_AXIS); 112 Interval staff_extent = staff->extent (staff, Y_AXIS);
113 center = staff_extent.center (); 113 center = staff_extent.center ();
114 } 114 }
115 115
116 if (str == "||:") 116 if (str == "||:")
117 str = "|:"; 117 str = "|:";
118 118
119 if (str == ".S")
120 str = "S";
121
119 if (str == "") 122 if (str == "")
120 { 123 {
121 Stencil empty = Lookup::blank (Box (Interval (0, 0), Interval (-h / 2, h / 2))); 124 Stencil empty = Lookup::blank (Box (Interval (0, 0), Interval (-h / 2, h / 2)));
122 empty.translate_axis (center, Y_AXIS); 125 empty.translate_axis (center, Y_AXIS);
123 return empty; 126 return empty;
124 } 127 }
125 else if (str == "|") 128 else if (str == "|")
126 { 129 {
127 thin.translate_axis (center, Y_AXIS); 130 thin.translate_axis (center, Y_AXIS);
128 return thin; 131 return thin;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 193 }
191 else if (str == "||") 194 else if (str == "||")
192 { 195 {
193 /* 196 /*
194 should align to other side? this never appears 197 should align to other side? this never appears
195 on the system-start? 198 on the system-start?
196 */ 199 */
197 m.add_at_edge (X_AXIS, RIGHT, thin, 0); 200 m.add_at_edge (X_AXIS, RIGHT, thin, 0);
198 m.add_at_edge (X_AXIS, RIGHT, thin, thinkern); 201 m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);
199 } 202 }
203 else if (str == "S")
204 {
205 Stencil segno = Font_interface::get_default_font (me)->find_by_name ("scri pts.varsegno");
206 m.add_at_edge (X_AXIS, RIGHT, thin, 0);
207 m.add_at_edge (X_AXIS, RIGHT, segno, thinkern / 2);
208 m.add_at_edge (X_AXIS, RIGHT, thin, thinkern / 2);
209 }
200 else if (str == ":") 210 else if (str == ":")
201 { 211 {
202 int c = (Staff_symbol_referencer::line_count (me)); 212 int c = (Staff_symbol_referencer::line_count (me));
203 213
204 for (int i = 0; i < c - 1; i++) 214 for (int i = 0; i < c - 1; i++)
205 { 215 {
206 Real y = (- (c - 1.0) / 2 + 0.5 + i) * staff_space; 216 Real y = (- (c - 1.0) / 2 + 0.5 + i) * staff_space;
207 Stencil d (dot); 217 Stencil d (dot);
208 218
209 d.translate_axis (y, Y_AXIS); 219 d.translate_axis (y, Y_AXIS);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 372 }
363 373
364 ADD_INTERFACE (Bar_line, 374 ADD_INTERFACE (Bar_line,
365 "Bar line.\n" 375 "Bar line.\n"
366 "\n" 376 "\n"
367 "Print a special bar symbol. It replaces the regular bar" 377 "Print a special bar symbol. It replaces the regular bar"
368 " symbol with a special symbol. The argument @var{bartype}" 378 " symbol with a special symbol. The argument @var{bartype}"
369 " is a string which specifies the kind of bar line to print." 379 " is a string which specifies the kind of bar line to print."
370 " Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{ :|.|:}," 380 " Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{ :|.|:},"
371 " @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{. |.}," 381 " @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{. |.},"
372 » " @code{|.|}, @code{:}, @code{dashed} and @code{'}.\n" 382 » " @code{|.|}, @code{:}, @code{dashed}, code{S} and @code{'}.\n"
Neil Puttock 2010/01/07 22:55:40 @code{S}
373 "\n" 383 "\n"
374 "These produce, respectively, a normal bar line, a right repeat, a left repeat," 384 "These produce, respectively, a normal bar line, a right repeat, a left repeat,"
375 " a thick double repeat, a thin-thick-thin double repeat," 385 " a thick double repeat, a thin-thick-thin double repeat,"
376 " a thin-thick double repeat, a thick bar, a double bar, a start bar," 386 " a thin-thick double repeat, a thick bar, a double bar, a start bar,"
377 " an end bar, a thick double bar, a thin-thick-thin bar," 387 " an end bar, a thick double bar, a thin-thick-thin bar,"
378 » " a dotted bar, a dashed bar and a tick as bar bar line." 388 » " a dotted bar, a dashed bar, a segno bar and a tick as bar bar l ine."
379 " In addition, there is an option" 389 " In addition, there is an option"
380 " @code{||:} which is equivalent to @code{|:} except at line" 390 " @code{||:} which is equivalent to @code{|:} except at line"
381 " breaks, where it produces a double bar (@code{||}) at the" 391 " breaks, where it produces a double bar (@code{||}) at the"
382 " end of the line and a repeat sign (@code{|:}) at the" 392 " end of the line and a repeat sign (@code{|:}) at the"
383 " beginning of the new line.\n" 393 " beginning of the new line.\n"
394 " For segno, there is @code{.S} which is equivalent to @code{S};"
395 " at line breaks, it produces a normal bar line at the end and a segno bar line"
396 " at the beginning of the following line,"
397 " whereas @code{S.} behaves just contrary.\n"
384 "\n" 398 "\n"
385 "If @var{bartype} is set to @code{empty} then nothing is" 399 "If @var{bartype} is set to @code{empty} then nothing is"
386 " printed, but a line break is allowed at that spot.\n" 400 " printed, but a line break is allowed at that spot.\n"
387 "\n" 401 "\n"
388 "@code{gap} is used for the gaps in dashed bar lines.", 402 "@code{gap} is used for the gaps in dashed bar lines.",
389 403
390 /* properties */ 404 /* properties */
391 "allow-span-bar " 405 "allow-span-bar "
392 "gap " 406 "gap "
393 "kern " 407 "kern "
394 "thin-kern " 408 "thin-kern "
395 "hair-thickness " 409 "hair-thickness "
396 "thick-thickness " 410 "thick-thickness "
397 "glyph " 411 "glyph "
398 "glyph-name " 412 "glyph-name "
399 "bar-size " 413 "bar-size "
400 "bar-extent " 414 "bar-extent "
401 ); 415 );
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b