diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-07-20 19:08:31 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-07-20 19:08:31 +0000 |
| commit | fdf69629c66f6c1a69d88a00bb6c1311c97b631b (patch) | |
| tree | d35f16b943cf6b1635e12d16e2452b034643fea5 /src/sp-guide.cpp | |
| parent | Add string output functions for units. (diff) | |
| download | inkscape-fdf69629c66f6c1a69d88a00bb6c1311c97b631b.tar.gz inkscape-fdf69629c66f6c1a69d88a00bb6c1311c97b631b.zip | |
Ported away from and removed "sp-metrics.*".
(bzr r12380.1.47)
Diffstat (limited to 'src/sp-guide.cpp')
| -rw-r--r-- | src/sp-guide.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index 48596cbc0..961e53e04 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -35,7 +35,6 @@ #include <glibmm/i18n.h> #include <xml/repr.h> #include <remove-last.h> -#include "sp-metrics.h" #include "inkscape.h" #include "desktop.h" #include "sp-namedview.h" @@ -463,10 +462,10 @@ char *sp_guide_description(SPGuide const *guide, const bool verbose) } else { SPNamedView *namedview = sp_document_namedview(guide->document, NULL); - GString *position_string_x = SP_PX_TO_METRIC_STRING(guide->point_on_line[X], - namedview->getDefaultMetric()); - GString *position_string_y = SP_PX_TO_METRIC_STRING(guide->point_on_line[Y], - namedview->getDefaultMetric()); + Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(guide->point_on_line[X], "px"); + Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(guide->point_on_line[Y], "px"); + GString *position_string_x = g_string_new(x_q.string(*namedview->doc_units).c_str()); + GString *position_string_y = g_string_new(y_q.string(*namedview->doc_units).c_str()); gchar *shortcuts = g_strdup_printf("; %s", _("<b>Shift+drag</b> to rotate, <b>Ctrl+drag</b> to move origin, <b>Del</b> to delete")); |
