summaryrefslogtreecommitdiff
path: root/silx/gui/_glutils/font.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/_glutils/font.py')
-rw-r--r--silx/gui/_glutils/font.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/silx/gui/_glutils/font.py b/silx/gui/_glutils/font.py
index 8403c5a..6a4c489 100644
--- a/silx/gui/_glutils/font.py
+++ b/silx/gui/_glutils/font.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2020 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -128,8 +128,8 @@ def rasterText(text, font,
width = bounds.width() * devicePixelRatio + 2
# align line size to 32 bits to ease conversion to numpy array
width = 4 * ((width + 3) // 4)
- image = qt.QImage(width,
- bounds.height() * devicePixelRatio + 2,
+ image = qt.QImage(int(width),
+ int(bounds.height() * devicePixelRatio + 2),
qt.QImage.Format_RGB888)
if (devicePixelRatio != 1.0 and
hasattr(image, 'setDevicePixelRatio')): # Qt 5