diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-08-27 16:32:55 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-08-27 16:32:55 +0000 |
| commit | f10048be170a45921ae8fc65ccd2588a9ad2897d (patch) | |
| tree | c0abadf8d3b7ffb325061d797e5b8d9d8b2aefeb /src/extension/internal/latex-pstricks.cpp | |
| parent | Use real world units for page sizes. (diff) | |
| download | inkscape-f10048be170a45921ae8fc65ccd2588a9ad2897d.tar.gz inkscape-f10048be170a45921ae8fc65ccd2588a9ad2897d.zip | |
Added viewBox implement document unit support.
(bzr r12475.1.2)
Diffstat (limited to 'src/extension/internal/latex-pstricks.cpp')
| -rw-r--r-- | src/extension/internal/latex-pstricks.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index 2ece1ba87..c8e8e2f2e 100644 --- a/src/extension/internal/latex-pstricks.cpp +++ b/src/extension/internal/latex-pstricks.cpp @@ -117,8 +117,8 @@ unsigned int PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc } // width and height in pt - _width = doc->getWidth() * Inkscape::Util::Quantity::convert(1, "px", "pt"); - _height = doc->getHeight() * Inkscape::Util::Quantity::convert(1, "px", "pt"); + _width = doc->getWidth().value("pt"); + _height = doc->getHeight().value("pt"); if (res >= 0) { @@ -128,10 +128,10 @@ unsigned int PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc os << "\\psset{xunit=.5pt,yunit=.5pt,runit=.5pt}\n"; // from now on we can output px, but they will be treated as pt - os << "\\begin{pspicture}(" << doc->getWidth() << "," << doc->getHeight() << ")\n"; + os << "\\begin{pspicture}(" << doc->getWidth().value("px") << "," << doc->getHeight().value("px") << ")\n"; } - m_tr_stack.push( Geom::Scale(1, -1) * Geom::Translate(0, doc->getHeight())); /// @fixme hardcoded doc2dt transform + m_tr_stack.push( Geom::Scale(1, -1) * Geom::Translate(0, doc->getHeight().value("px"))); /// @fixme hardcoded doc2dt transform return fprintf(_stream, "%s", os.str().c_str()); } |
