summaryrefslogtreecommitdiff
path: root/libmat2/pdf.py
diff options
context:
space:
mode:
authorjvoisin2018-07-02 00:22:05 +0200
committerjvoisin2018-07-02 00:22:05 +0200
commit893f58554ab963f8abd4a08222a311014322fff1 (patch)
treefe4ec24bc5089a6701ab985e1ad3f6a1151ea9a4 /libmat2/pdf.py
parent11008f8fd436f0b8b00bc600a2cd7a77b55c7494 (diff)
Improve a bit the formatting of the code thanks to pyflakes3
Diffstat (limited to 'libmat2/pdf.py')
-rw-r--r--libmat2/pdf.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmat2/pdf.py b/libmat2/pdf.py
index 300fd4a..fa7f764 100644
--- a/libmat2/pdf.py
+++ b/libmat2/pdf.py
@@ -83,7 +83,9 @@ class PDFParser(abstract.AbstractParser):
83 page_width, page_height = page.get_size() 83 page_width, page_height = page.get_size()
84 logging.info("Rendering page %d/%d", pagenum + 1, pages_count) 84 logging.info("Rendering page %d/%d", pagenum + 1, pages_count)
85 85
86 img_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(page_width) * self.__scale, int(page_height) * self.__scale) 86 width = int(page_width) * self.__scale
87 height = int(page_height) * self.__scale
88 img_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
87 img_context = cairo.Context(img_surface) 89 img_context = cairo.Context(img_surface)
88 90
89 img_context.scale(self.__scale, self.__scale) 91 img_context.scale(self.__scale, self.__scale)