From 47efbc447700514376afa993eae9536692ef01f8 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:12:30 +0000 Subject: [PATCH] lilypond-1.0.1 --- lily/graphical-element.cc | 33 ++++++++++++++------------------- lily/horizontal-group-item.cc | 7 ++++++- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lily/graphical-element.cc b/lily/graphical-element.cc index f9273f0ee3..d604fba9c3 100644 --- a/lily/graphical-element.cc +++ b/lily/graphical-element.cc @@ -3,11 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "graphical-element.hh" -#include "axis-group-element.hh" +#include "graphical-axis-group.hh" #include "debug.hh" bool @@ -26,14 +26,9 @@ Graphical_element::Graphical_element (Graphical_element const &s) init (); empty_b_ = s.empty_b_; axis_group_l_a_[0] = axis_group_l_a_[1] =0; - offset_ = Offset (0,0); + offset_ = Offset (0,0); // Hmmmm.... Should copy? } -Graphical_element::~Graphical_element () -{ - -} - void Graphical_element::init () { @@ -58,7 +53,7 @@ Real Graphical_element::absolute_coordinate (Axis a) const { Real r = offset_[a]; - for (Axis_group_element * axis_group_l = axis_group_l_a_[a]; + for (Graphical_axis_group * axis_group_l = axis_group_l_a_[a]; axis_group_l; axis_group_l = axis_group_l->axis_group_l_a_[a]) r += axis_group_l->offset_[a]; @@ -81,10 +76,10 @@ Graphical_element::translate_axis (Real y, Axis a) } Real -Graphical_element::relative_coordinate (Axis_group_element*e, Axis a) const +Graphical_element::relative_coordinate (Graphical_axis_group*e, Axis a) const { Real r =0.0; - for (Axis_group_element * axis_group_l = axis_group_l_a_[a]; + for (Graphical_axis_group * axis_group_l = axis_group_l_a_[a]; axis_group_l != e; axis_group_l = axis_group_l->axis_group_l_a_[a]) r += axis_group_l->offset_[a]; @@ -92,17 +87,17 @@ Graphical_element::relative_coordinate (Axis_group_element*e, Axis a) const return r; } -Axis_group_element* +Graphical_axis_group* Graphical_element::common_group (Graphical_element const* s, Axis a) const { - Link_array my_groups; - for (Axis_group_element * axis_group_l = axis_group_l_a_[a]; + Link_array my_groups; + for (Graphical_axis_group * axis_group_l = axis_group_l_a_[a]; axis_group_l; axis_group_l = axis_group_l->axis_group_l_a_[a]) my_groups.push (axis_group_l); - Axis_group_element* common_l=0; - for (Axis_group_element * axis_group_l = s->axis_group_l_a_[a]; + Graphical_axis_group* common_l=0; + for (Graphical_axis_group * axis_group_l = s->axis_group_l_a_[a]; !common_l && axis_group_l; axis_group_l = axis_group_l->axis_group_l_a_[a]) common_l = my_groups.find_l (axis_group_l); @@ -169,7 +164,7 @@ Graphical_element::height() const void Graphical_element::unlink () { - for (int j=0; j < 2; j++) + for (int j=0; j < 2; j++) if (axis_group_l_a_[j]) axis_group_l_a_[j]->remove_element (this); } @@ -181,12 +176,12 @@ Graphical_element::junk_links () } void -Graphical_element::print () const +Graphical_element::do_print () const { #ifndef NPRINT if (offset_.x() || offset_.y ()) DOUT << "offset: " << offset_.str() ; - DOUT << "\n"; + DOUT << '\n'; #endif } diff --git a/lily/horizontal-group-item.cc b/lily/horizontal-group-item.cc index a894ba5214..4e4d559495 100644 --- a/lily/horizontal-group-item.cc +++ b/lily/horizontal-group-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "p-col.hh" @@ -16,3 +16,8 @@ Horizontal_group_item::do_print() const { Axis_group_item::do_print(); } + +Horizontal_group_item::Horizontal_group_item () +{ + axis1_ = axis2_ = X_AXIS; +} -- 2.39.5