diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2007-05-18 14:31:20 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2007-05-18 14:31:20 +0000 |
| commit | 30199223f474fbdf9cd09eec9b945071d030cba8 (patch) | |
| tree | da54efca631885563c53f27fe267004260ba0c11 /src | |
| parent | Minor fixes (diff) | |
| download | inkscape-30199223f474fbdf9cd09eec9b945071d030cba8.tar.gz inkscape-30199223f474fbdf9cd09eec9b945071d030cba8.zip | |
Apply Yossi's patch
(bzr r3028)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/latex-pstricks.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index a2d0d87f7..f86159449 100644 --- a/src/extension/internal/latex-pstricks.cpp +++ b/src/extension/internal/latex-pstricks.cpp @@ -127,50 +127,11 @@ PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc) _width = sp_document_width(doc) * PT_PER_PX; _height = sp_document_height(doc) * PT_PER_PX; - NRRect d; - bool pageLandscape; - // printf("Page Bounding Box: %s\n", pageBoundingBox ? "TRUE" : "FALSE"); -/* if (pageBoundingBox) { - d.x0 = d.y0 = 0; - d.x1 = ceil(_width); - d.y1 = ceil(_height); - } else */{ // no bounding boxes for now - SPItem* doc_item = SP_ITEM(sp_document_root(doc)); - sp_item_invoke_bbox(doc_item, &d, sp_item_i2r_affine(doc_item), TRUE); - // convert from px to pt - d.x0 *= PT_PER_PX; - d.x1 *= PT_PER_PX; - d.y0 *= PT_PER_PX; - d.y1 *= PT_PER_PX; - } - - if (res >= 0) { os << "%%Creator: " << PACKAGE_STRING << "\n"; os << "%%Please note this file requires PSTricks extensions\n"; - // 2004 Dec 10, BFC: - // The point of the following code is (1) to do the thing that's expected by users - // who have done File>New>A4_landscape or ...letter_landscape (i.e., rotate - // the output), while (2) not messing up users who simply want their output wider - // than it is tall (e.g., small figures for inclusion in LaTeX). - // The original patch by WQ only had the w>h condition. - { - double w = (d.x1 - d.x0); // width and height of bounding box, in pt - double h = (d.y1 - d.y0); - pageLandscape = ( - (w > 0. && h > 0.) // empty documents fail this sanity check, have w<0, h<0 - && (w > h) // implies, but does not prove, the user wanted landscape - && (w > 600) // approximate maximum printable width of an A4 - ) - ? true : false; - } - - if (pageLandscape) { - os << "\\rotate{90}\n"; - } - os << "\\psset{xunit=.5pt,yunit=.5pt,runit=.5pt}\n"; // from now on we can output px, but they will be treated as pt |
