]> git.donarmstrong.com Git - lilypond.git/blob - flower/axis.cc
61cb194118110efbd8940ba433025d3ca3fc74aa
[lilypond.git] / flower / axis.cc
1 /*
2   axis.cc -- implement Axis
3
4
5
6   (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include <assert.h>
10 #include "axes.hh"
11 #include "string.hh"
12
13 String
14 axis_name_string (Axis a)
15 {
16   return to_string (char (a + 'x'));
17 }
18
19
20 Axis
21 other_axis (Axis a)
22 {
23   return a ==  Y_AXIS ? X_AXIS : Y_AXIS;
24 }
25
26 /*
27   TODO inline these.
28  */
29 Axis
30 post_incr (Axis &a)
31 {
32   assert (a < NO_AXES);
33   Axis b= a;
34   a = Axis (int (a) + 1);
35   return b;
36 }
37
38 Axis
39 incr (Axis &a)
40 {
41   assert (a < NO_AXES);
42   a = Axis (int (a) + 1);
43   return a;
44 }
45