summaryrefslogtreecommitdiffstats
path: root/src/axis-manip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/axis-manip.cpp')
-rw-r--r--src/axis-manip.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/axis-manip.cpp b/src/axis-manip.cpp
index 1240d99e6..8955202c8 100644
--- a/src/axis-manip.cpp
+++ b/src/axis-manip.cpp
@@ -9,6 +9,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glib.h>
#include "axis-manip.h"
namespace Proj {
@@ -31,6 +32,14 @@ get_remaining_axes (Axis axis) {
return std::make_pair (extract_first_axis_direction (plane), extract_second_axis_direction (plane));
}
+char * string_from_axes (Box3D::Axis axis) {
+ GString *pstring = g_string_new("");
+ if (axis & Box3D::X) g_string_append_printf (pstring, "X");
+ if (axis & Box3D::Y) g_string_append_printf (pstring, "Y");
+ if (axis & Box3D::Z) g_string_append_printf (pstring, "Z");
+ return pstring->str;
+}
+
} // namespace Box3D
/*