From 07644f03486e4812ac85839b5eaba9f8bbbf890a Mon Sep 17 00:00:00 2001 From: tassaron Date: Mon, 22 May 2017 19:42:32 -0400 Subject: text and visualization colour can be changed using commandline --- video_thread.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'video_thread.py') diff --git a/video_thread.py b/video_thread.py index de508a8..6f71d38 100644 --- a/video_thread.py +++ b/video_thread.py @@ -19,8 +19,9 @@ class Worker(QtCore.QObject): self.core = core.Core() - @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, str, str) - def createVideo(self, backgroundImage, titleText, titleFont, fontSize, alignment, xOffset, yOffset, inputFile, outputFile): + @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, tuple, tuple, str, str) + def createVideo(self, backgroundImage, titleText, titleFont, fontSize, alignment,\ + xOffset, yOffset, textColor, visColor, inputFile, outputFile): # print('worker thread id: {}'.format(QtCore.QThread.currentThreadId())) def getBackgroundAtIndex(i): return self.core.drawBaseImage( @@ -30,7 +31,9 @@ class Worker(QtCore.QObject): fontSize, alignment, xOffset, - yOffset) + yOffset, + textColor, + visColor) progressBarValue = 0 self.progressBarUpdate.emit(progressBarValue) @@ -97,9 +100,9 @@ class Worker(QtCore.QObject): smoothConstantUp, lastSpectrum) if imBackground != None: - im = self.core.drawBars(lastSpectrum, imBackground) + im = self.core.drawBars(lastSpectrum, imBackground, visColor) else: - im = self.core.drawBars(lastSpectrum, getBackgroundAtIndex(bgI)) + im = self.core.drawBars(lastSpectrum, getBackgroundAtIndex(bgI), visColor) if bgI < len(backgroundFrames)-1: bgI += 1 -- cgit v1.2.3