diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-08-31 18:59:47 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-08-31 18:59:47 +0000 |
| commit | 6a306cf8edbaebacbe679a58f6b162657caf5ad0 (patch) | |
| tree | f043ce64170b0ab7ada1712efb8e38a3fbe5681a /src/axis-manip.cpp | |
| parent | Update to experimental r13483 (diff) | |
| parent | Header cleanup: stop using Glib types where they aren't truly needed. Eases G... (diff) | |
| download | inkscape-6a306cf8edbaebacbe679a58f6b162657caf5ad0.tar.gz inkscape-6a306cf8edbaebacbe679a58f6b162657caf5ad0.zip | |
Update to experimental r13531
(bzr r13090.1.106)
Diffstat (limited to 'src/axis-manip.cpp')
| -rw-r--r-- | src/axis-manip.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/axis-manip.cpp b/src/axis-manip.cpp index 1dfa0e6bf..8955202c8 100644 --- a/src/axis-manip.cpp +++ b/src/axis-manip.cpp @@ -1,6 +1,4 @@ -#define __AXIS_MANIP_C__ - -/* +/** * Generic auxiliary routines for 3D axes * * Authors: @@ -11,6 +9,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include <glib.h> #include "axis-manip.h" namespace Proj { @@ -33,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 /* @@ -44,4 +51,4 @@ get_remaining_axes (Axis axis) { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 : |
