aboutsummaryrefslogtreecommitdiff
path: root/preview_thread.py
diff options
context:
space:
mode:
authorMartin Kaistra2017-04-22 10:42:31 +0200
committerMartin Kaistra2017-04-22 10:42:31 +0200
commit6eb601ca9ab2d9efbe591e5f6ae0f19e732260a6 (patch)
tree9677c2cf51695134e6ffbfc288e33fb74a7ba667 /preview_thread.py
parent19cf45785461ffd44c8bdec7ae4634bf828e75ed (diff)
parent4aef5bfdb7f04dde13b1c6a94172824ce143be6e (diff)
Merge branch 'font-settings#8' of https://github.com/HunterwolfAT/audio-visualizer-python into HunterwolfAT-font-settings#8
Diffstat (limited to 'preview_thread.py')
-rw-r--r--preview_thread.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/preview_thread.py b/preview_thread.py
index 740f6c6..9dc7e4c 100644
--- a/preview_thread.py
+++ b/preview_thread.py
@@ -19,13 +19,17 @@ class Worker(QtCore.QObject):
self.queue = queue
- @pyqtSlot(str, str, QtGui.QFont)
- def createPreviewImage(self, backgroundImage, titleText, titleFont):
+ @pyqtSlot(str, str, QtGui.QFont, int, int, int, int)
+ def createPreviewImage(self, backgroundImage, titleText, titleFont, fontSize, alignment, xOffset, yOffset):
# print('worker thread id: {}'.format(QtCore.QThread.currentThreadId()))
dic = {
"backgroundImage": backgroundImage,
"titleText": titleText,
- "titleFont": titleFont
+ "titleFont": titleFont,
+ "fontSize": fontSize,
+ "alignment": alignment,
+ "xoffset": xOffset,
+ "yoffset": yOffset
}
self.queue.put(dic)
@@ -42,7 +46,11 @@ class Worker(QtCore.QObject):
im = self.core.drawBaseImage(
nextPreviewInformation["backgroundImage"],
nextPreviewInformation["titleText"],
- nextPreviewInformation["titleFont"])
+ nextPreviewInformation["titleFont"],
+ nextPreviewInformation["fontSize"],
+ nextPreviewInformation["alignment"],
+ nextPreviewInformation["xoffset"],
+ nextPreviewInformation["yoffset"])
spectrum = numpy.fromfunction(lambda x: 0.008*(x-128)**2, (255,), dtype="int16")