/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2008--2012 Han-Wen Nienhuys <hanwen@lilypond.org>
+ Copyright (C) 2008--2014 Han-Wen Nienhuys <hanwen@lilypond.org>
LilyPond is free software: you can redistribute it and/or modify
#include "skyline-pair.hh"
#include "international.hh"
-#include "ly-smobs.icc"
Skyline_pair::Skyline_pair ()
: skylines_ (Skyline (DOWN), Skyline (UP))
skylines_[DOWN].print ();
}
+Real
+Skyline_pair::left () const
+{
+ return min (skylines_[UP].left (), skylines_[DOWN].left ());
+}
+
+Real
+Skyline_pair::right () const
+{
+ return max (skylines_[UP].right (), skylines_[DOWN].right ());
+}
+
void
Skyline_pair::print_points () const
{
return skylines_[d];
}
-IMPLEMENT_SIMPLE_SMOBS (Skyline_pair);
-IMPLEMENT_TYPE_P (Skyline_pair, "ly:skyline-pair?");
-IMPLEMENT_DEFAULT_EQUAL_P (Skyline_pair);
+const char Skyline_pair::type_p_name_[] = "ly:skyline-pair?";
-SCM
-Skyline_pair::mark_smob (SCM)
-{
- return SCM_EOL;
-}
-
-int
-Skyline_pair::print_smob (SCM s, SCM port, scm_print_state *)
-{
- Skyline_pair *r = (Skyline_pair *) SCM_CELL_WORD_1 (s);
- (void) r;
-
- scm_puts ("#<Skyline-pair>", port);
- return 1;
-}
MAKE_SCHEME_CALLBACK (Skyline_pair, skyline, 2);
SCM