From acebed3c4fbec3032425edc40923c3e765598d1b Mon Sep 17 00:00:00 2001 From: George Reales Date: Mon, 18 May 2020 20:48:43 +0200 Subject: [PATCH] Added ResamplingQuality::highResamplingQuality --- Source/Gui/ButtonList.h | 1 + Source/Gui/Knob.h | 1 + Source/Gui/TooglableButton.h | 2 +- Source/PluginEditor.cpp | 11 ++++++++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Source/Gui/ButtonList.h b/Source/Gui/ButtonList.h index c65ec53..97af316 100755 --- a/Source/Gui/ButtonList.h +++ b/Source/Gui/ButtonList.h @@ -94,6 +94,7 @@ public: void paintOverChildren (Graphics& g) override { int ofs = getSelectedId() - 1; + g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality); g.drawImage(kni, 0, 0, getWidth(), getHeight(), 0, h2 * ofs, w2, h2); } diff --git a/Source/Gui/Knob.h b/Source/Gui/Knob.h index 6d4663f..1097b99 100755 --- a/Source/Gui/Knob.h +++ b/Source/Gui/Knob.h @@ -87,6 +87,7 @@ public: void paint (Graphics& g) override { int ofs = (int) ((getValue() - getMinimum()) / (getMaximum() - getMinimum()) * (numFr - 1)); + g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality); g.drawImage (kni, 0, 0, getWidth(), getHeight(), 0, h2 * ofs, w2, h2); } diff --git a/Source/Gui/TooglableButton.h b/Source/Gui/TooglableButton.h index af3f055..7d57ffa 100755 --- a/Source/Gui/TooglableButton.h +++ b/Source/Gui/TooglableButton.h @@ -99,7 +99,7 @@ public: { offset = 1; } - + g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality); g.drawImage(kni, 0, 0, getWidth(), getHeight(), 0, offset * h2, w2, h2); } diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index be01847..0a5d836 100755 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -449,8 +449,11 @@ void ObxdAudioProcessorEditor::paint(Graphics& g) if (skinFolder.exists() && mainFile.exists()) { - const Image image = ImageCache::getFromFile(mainFile); - + + const Image image = ImageCache::getFromFile(mainFile); + + g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality); + g.drawImage (image, 0, 0, image.getWidth()/2, image.getHeight()/2, // /2 preliminar retina support 0, 0, image.getWidth(), image.getHeight()); @@ -458,7 +461,9 @@ void ObxdAudioProcessorEditor::paint(Graphics& g) else { const Image image = ImageCache::getFromMemory(BinaryData::main_png, BinaryData::main_pngSize); - + + g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality); + g.drawImage (image, 0, 0, image.getWidth(), image.getHeight(), 0, 0, image.getWidth(), image.getHeight());