diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-07-31 22:33:03 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-07-31 22:33:03 +0000 |
| commit | f1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b (patch) | |
| tree | ce3ca9ef9daa04c0474e859c939dfabd1ebab557 /src/svg | |
| parent | Added percent support back to select toolbar. (diff) | |
| download | inkscape-f1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b.tar.gz inkscape-f1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b.zip | |
Eliminate "unit-constants.h".
(bzr r12380.1.54)
Diffstat (limited to 'src/svg')
| -rw-r--r-- | src/svg/svg-length.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/svg/svg-length.cpp b/src/svg/svg-length.cpp index d2f4332d8..7f93f9f0f 100644 --- a/src/svg/svg-length.cpp +++ b/src/svg/svg-length.cpp @@ -23,7 +23,7 @@ #include "svg.h" #include "stringstream.h" -#include "../unit-constants.h" +#include "util/units.h" static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, float *val, float *computed, char **next); @@ -365,7 +365,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::PT; } if (computed) { - *computed = v * PX_PER_PT; + *computed = v * Inkscape::Util::Quantity::convert(1, "pt", "px"); } break; case UVAL('p','c'): @@ -373,7 +373,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::PC; } if (computed) { - *computed = v * PX_PER_PC; + *computed = v * Inkscape::Util::Quantity::convert(1, "pc", "px"); } break; case UVAL('m','m'): @@ -381,7 +381,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::MM; } if (computed) { - *computed = v * PX_PER_MM; + *computed = v * Inkscape::Util::Quantity::convert(1, "mm", "px"); } break; case UVAL('c','m'): @@ -389,7 +389,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::CM; } if (computed) { - *computed = v * PX_PER_CM; + *computed = v * Inkscape::Util::Quantity::convert(1, "cm", "px"); } break; case UVAL('i','n'): @@ -397,7 +397,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::INCH; } if (computed) { - *computed = v * PX_PER_IN; + *computed = v * Inkscape::Util::Quantity::convert(1, "in", "px"); } break; case UVAL('f','t'): @@ -405,7 +405,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::FOOT; } if (computed) { - *computed = v * PX_PER_FT; + *computed = v * Inkscape::Util::Quantity::convert(1, "ft", "px"); } break; case UVAL('e','m'): |
