summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Weller <ianweller@gmail.com>2008-09-29 23:06:03 -0500
committerIan Weller <ianweller@gmail.com>2008-09-29 23:06:03 -0500
commit66e0193d0771387b40407af4a3ee07237f9eea84 (patch)
tree8bc5aeca28bb893857f796f7e3c7c18794c3e2ca
parentcc7006c9187eb4cd4bb3898d541e72196492c58a (diff)
downloadfedora-business-cards-66e0193d0771387b40407af4a3ee07237f9eea84.zip
fedora-business-cards-66e0193d0771387b40407af4a3ee07237f9eea84.tar.gz
fedora-business-cards-66e0193d0771387b40407af4a3ee07237f9eea84.tar.xz
Fix DPI in export, update .gitignore
-rw-r--r--.gitignore2
-rw-r--r--fedora_business_cards/export.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 5a1b67b..ac1503d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,5 @@
*.swp
*.pyc
*.pyo
-*out.svg
*.png
+*.svg
diff --git a/fedora_business_cards/export.py b/fedora_business_cards/export.py
index 5d3d922..9b68451 100644
--- a/fedora_business_cards/export.py
+++ b/fedora_business_cards/export.py
@@ -50,6 +50,7 @@ def svg_to_pdf_png(xmlstring, filename, format='png', dpi=300):
height = int(svg.props.height/90.*dpi)
surface = cairo.PDFSurface(pdffile, width, height)
ctx = cairo.Context(surface)
+ ctx.scale(dpi/90., dpi/90.)
svg.render_cairo(ctx)
if format == "png":
surface.write_to_png(filename)