source file of the GNU LilyPond music typesetter
- (c) 2002--2005 Juergen Reuter <reuter@ipd.uka.de>
+ (c) 2002--2006 Juergen Reuter <reuter@ipd.uka.de>
- Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "cluster.hh"
#include <cstdio>
+using namespace std;
#include "spanner.hh"
#include "item.hh"
String shape;
if (scm_is_symbol (shape_scm))
- {
- shape = ly_symbol2string (shape_scm);
- }
+ shape = ly_symbol2string (shape_scm);
else
{
programming_error ("#'style should be symbol.");
{
points.push (bottom_points[0] - vpadding + hpadding);
for (int i = 1; i < size - 1; i++)
- {
- points.push (bottom_points[i] - vpadding);
- }
+ points.push (bottom_points[i] - vpadding);
points.push (bottom_points[size - 1] - vpadding - hpadding);
points.push (top_points[size - 1] + vpadding - hpadding);
for (int i = size - 2; i > 0; i--)
- {
- points.push (top_points[i] + vpadding);
- }
+ points.push (top_points[i] + vpadding);
points.push (top_points[0] + vpadding + hpadding);
out.add_stencil (Lookup::round_filled_polygon (points, blotdiameter));
}
else
- {
- me->warning (_f ("unknown cluster style `%s'", shape.to_str0 ()));
- }
+ me->warning (_f ("unknown cluster style `%s'", shape.to_str0 ()));
return out;
}
line with the center of the note heads?
*/
- for (int i = 0; i < cols.size (); i++)
+ for (int i = 0; i < cols.size (); i++)
{
Grob *col = cols[i];
-
+
Interval yext = col->extent (commony, Y_AXIS);
Real x = col->relative_coordinate (commonx, X_AXIS) - left_coord;
/*
Across a line break we anticipate on the next pitches.
*/
- if (spanner->original_)
+ if (spanner->original ())
{
- Spanner *orig = dynamic_cast<Spanner *> (spanner->original_);
+ Spanner *orig = dynamic_cast<Spanner *> (spanner->original ());
if (spanner->get_break_index () < orig->broken_intos_.size () - 1)
{
Spanner *next = orig->broken_intos_[spanner->get_break_index () + 1];
Link_array<Grob> const &next_cols = extract_grob_array (next, "columns");
- if (next_cols.size() > 0)
+ if (next_cols.size () > 0)
{
Grob *next_commony = common_refpoint_of_array (next_cols, next, Y_AXIS);
Grob *col = next_cols[0];
struct Cluster_beacon
{
public:
- DECLARE_SCHEME_CALLBACK (height, (SCM, SCM));
+ DECLARE_SCHEME_CALLBACK (height, (SCM));
static bool has_interface (Grob *);
};
-MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 2);
+MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1);
SCM
-Cluster_beacon::height (SCM g, SCM)
+Cluster_beacon::height (SCM g)
{
Grob *me = unsmob_grob (g);
Interval v = robust_scm2interval (me->get_property ("positions"),
"cluster-beacon-interface",
"A place holder for the cluster spanner to determine the vertical "
"extents of a cluster spanner at this X position.",
- "positions");
+
+ /* properties */
+ "positions ");