]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/box.cc
2003 -> 2004
[lilypond.git] / lily / box.cc
index a74a6a7ad0fe9ec1d10a84fe87a2fe95bd458bb7..4854743b8bdcb5893d8ad2d49f87eee04736a196 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--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "box.hh"
@@ -68,3 +68,17 @@ 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()); 
+}
+void
+Box::widen (Real x, Real y)
+{
+  interval_a_[X_AXIS].widen (x);
+  interval_a_[Y_AXIS].widen (y);
+  
+}