]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/box.cc
* input/test/spanner-after-break-tweak.ly: import
[lilypond.git] / lily / box.cc
index 03be5e9a0ab69f830553eeedb91f5d89a88ea01e..c678caf76b40e978b31d0c6d10e1a3136161aa38 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996--2003 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()); 
+}