aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authortassaron2017-06-01 09:05:20 -0400
committertassaron2017-06-01 09:05:20 -0400
commit2afdba04fded945f0b47f989e228a8eedd3d50d2 (patch)
tree368fb001490139b85508a1951694217a8add2194 /components
parent1eeb763dc31343762f827f9610eb464cce4fd7cc (diff)
minor fixes, comments
Diffstat (limited to 'components')
-rw-r--r--components/text.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/components/text.py b/components/text.py
index c9359f2..c0bb61f 100644
--- a/components/text.py
+++ b/components/text.py
@@ -95,19 +95,16 @@ class Component(__base__.Component):
im = Image.new("RGBA", (width, height),(0,0,0,0))
image = ImageQt(im)
- image1 = QtGui.QImage(image)
- painter = QPainter(image1)
+ painter = QPainter(image)
self.titleFont.setPixelSize(self.fontSize)
painter.setFont(self.titleFont)
painter.setPen(QColor(*self.textColor))
-
- fm = QtGui.QFontMetrics(self.titleFont)
painter.drawText(self.xPosition, self.yPosition, self.title)
painter.end()
buffer = QtCore.QBuffer()
buffer.open(QtCore.QIODevice.ReadWrite)
- image1.save(buffer, "PNG")
+ image.save(buffer, "PNG")
strio = io.BytesIO()
strio.write(buffer.data())