diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-08-30 21:35:42 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-08-30 21:35:42 +0000 |
| commit | 8756c49b91fd4262b6770ac3b2f229209bdae96b (patch) | |
| tree | 67ac89d7bc7c69e04e811324734dccafc07f33c9 /src/ui/clipboard.cpp | |
| parent | Merged from trunk (r12465). (diff) | |
| parent | Merge emf/wmf work (diff) | |
| download | inkscape-8756c49b91fd4262b6770ac3b2f229209bdae96b.tar.gz inkscape-8756c49b91fd4262b6770ac3b2f229209bdae96b.zip | |
Merged from trunk (r12488).
(bzr r11608.1.120)
Diffstat (limited to 'src/ui/clipboard.cpp')
| -rw-r--r-- | src/ui/clipboard.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 59fcb9ec0..6241464c2 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -78,7 +78,7 @@ #include "text-editing.h" #include "tools-switch.h" #include "path-chemistry.h" -#include "unit-constants.h" +#include "util/units.h" #include "helper/png-write.h" #include "svg/svg-color.h" #include "sp-namedview.h" @@ -1078,14 +1078,14 @@ void ClipboardManagerImpl::_onGet(Gtk::SelectionData &sel, guint /*info*/) try { if (out == outlist.end() && target == "image/png") { - gdouble dpi = PX_PER_IN; + gdouble dpi = Inkscape::Util::Quantity::convert(1, "in", "px"); guint32 bgcolor = 0x00000000; Geom::Point origin (_clipboardSPDoc->getRoot()->x.computed, _clipboardSPDoc->getRoot()->y.computed); Geom::Rect area = Geom::Rect(origin, origin + _clipboardSPDoc->getDimensions()); - unsigned long int width = (unsigned long int) (area.width() * dpi / PX_PER_IN + 0.5); - unsigned long int height = (unsigned long int) (area.height() * dpi / PX_PER_IN + 0.5); + unsigned long int width = (unsigned long int) (area.width() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); + unsigned long int height = (unsigned long int) (area.height() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); // read from namedview Inkscape::XML::Node *nv = sp_repr_lookup_name (_clipboardSPDoc->rroot, "sodipodi:namedview"); |
