diff options
| author | Aaron Spike <aaron@ekips.org> | 2008-09-05 04:07:55 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2008-09-05 04:07:55 +0000 |
| commit | 4c435ad1e98a65a0c5eb19ee28b7774e012a01c9 (patch) | |
| tree | 80873db7a1460bf0118db330a1defb0afb9a7d6f /src/helper/pixbuf-ops.cpp | |
| parent | convert moveto, lineto and curveto native to Point, instead of going to gdoub... (diff) | |
| download | inkscape-4c435ad1e98a65a0c5eb19ee28b7774e012a01c9.tar.gz inkscape-4c435ad1e98a65a0c5eb19ee28b7774e012a01c9.zip | |
Make rasterization of filters into pdf respect the requested dpi.
This is patch is the result of cooperation between John Cliff, Josh Blocher and myself. There remains an issue with the positioning of filtered objects that originally possessed transforms.
(bzr r6760)
Diffstat (limited to 'src/helper/pixbuf-ops.cpp')
| -rw-r--r-- | src/helper/pixbuf-ops.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index 94976da27..711e691f0 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -27,6 +27,7 @@ #include <sp-item.h> #include <sp-root.h> #include <sp-defs.h> +#include "unit-constants.h" #include "libnr/nr-matrix-translate-ops.h" #include "libnr/nr-scale-ops.h" @@ -90,7 +91,7 @@ sp_export_jpg_file(SPDocument *doc, gchar const *filename, GdkPixbuf* sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, double x0, double y0, double x1, double y1, - unsigned width, unsigned height, double /*xdpi*/, double /*ydpi*/, + unsigned width, unsigned height, double xdpi, double ydpi, unsigned long bgcolor, GSList *items_only) @@ -108,16 +109,13 @@ sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, double zoom_scale = 1.0; double padding = 1.0; - width = (int)ceil(screen[Geom::X].extent() * zoom_scale * padding); - height = (int)ceil(screen[Geom::Y].extent() * zoom_scale * padding); - Geom::Point origin(screen.min()[Geom::X], sp_document_height(doc) - screen[Geom::Y].extent() - screen.min()[Geom::Y]); origin[Geom::X] = origin[Geom::X] + (screen[Geom::X].extent() * ((1 - padding) / 2)); origin[Geom::Y] = origin[Geom::Y] + (screen[Geom::Y].extent() * ((1 - padding) / 2)); - Geom::Scale scale(zoom_scale, zoom_scale); + Geom::Scale scale( (xdpi / PX_PER_IN), (ydpi / PX_PER_IN)); Geom::Matrix affine = scale * Geom::Translate(-origin * scale); /* Create ArenaItems and set transform */ |
