diff options
| author | tassaron | 2017-07-13 00:05:11 -0400 |
|---|---|---|
| committer | tassaron | 2017-07-13 00:05:11 -0400 |
| commit | 8811b699a9c2d6b78af1e2a332d3031aef73aec4 (patch) | |
| tree | e62f318fb625c5c79314de2eb0ce4b7b93e7496c /src/components/original.py | |
| parent | 2e37dafd7036973a315b525f131850a6fb6d0b35 (diff) | |
merge consecutive static components
Diffstat (limited to 'src/components/original.py')
| -rw-r--r-- | src/components/original.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/original.py b/src/components/original.py index 638095d..3599c30 100644 --- a/src/components/original.py +++ b/src/components/original.py @@ -21,6 +21,7 @@ class Component(Component): def widget(self, parent): self.parent = parent + self.settings = self.parent.core.settings self.visColor = (255, 255, 255) self.scale = 20 self.y = 0 @@ -76,8 +77,8 @@ class Component(Component): def previewRender(self, previewWorker): spectrum = numpy.fromfunction( lambda x: float(self.scale)/2500*(x-128)**2, (255,), dtype="int16") - width = int(previewWorker.core.settings.value('outputWidth')) - height = int(previewWorker.core.settings.value('outputHeight')) + width = int(self.settings.value('outputWidth')) + height = int(self.settings.value('outputHeight')) return self.drawBars( width, height, spectrum, self.visColor, self.layout ) @@ -88,8 +89,8 @@ class Component(Component): self.smoothConstantUp = 0.8 self.lastSpectrum = None self.spectrumArray = {} - self.width = int(self.worker.core.settings.value('outputWidth')) - self.height = int(self.worker.core.settings.value('outputHeight')) + self.width = int(self.settings.value('outputWidth')) + self.height = int(self.settings.value('outputHeight')) for i in range(0, len(self.completeAudioArray), self.sampleSize): if self.canceled: |
