]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/box.cc
parse scm fixes
[lilypond.git] / lily / box.cc
index eb31e8311071473ad772d23f7063e8bbace2b25d..efed2217b57af21b1d870e0e11a95d90d44a17b8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "box.hh"
@@ -61,3 +61,17 @@ Box::scale (Real s)
   interval_a_[X_AXIS] *= s;
   interval_a_[Y_AXIS] *= s;
 }
+
+void
+Box::add_point (Offset o)
+{
+  interval_a_[X_AXIS].add_point (o[X_AXIS]);
+  interval_a_[Y_AXIS].add_point (o[Y_AXIS]);  
+}
+
+Offset
+Box::center () const
+{
+  return Offset (interval_a_[X_AXIS].center(),
+                interval_a_[Y_AXIS].center()); 
+}