2
0
Fork 0

Added ResamplingQuality::highResamplingQuality

This commit is contained in:
George Reales 2020-05-18 20:48:43 +02:00
parent 5869f6435f
commit acebed3c4f
4 changed files with 11 additions and 4 deletions

View File

@ -94,6 +94,7 @@ public:
void paintOverChildren (Graphics& g) override void paintOverChildren (Graphics& g) override
{ {
int ofs = getSelectedId() - 1; int ofs = getSelectedId() - 1;
g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality);
g.drawImage(kni, 0, 0, getWidth(), getHeight(), 0, h2 * ofs, w2, h2); g.drawImage(kni, 0, 0, getWidth(), getHeight(), 0, h2 * ofs, w2, h2);
} }

View File

@ -87,6 +87,7 @@ public:
void paint (Graphics& g) override void paint (Graphics& g) override
{ {
int ofs = (int) ((getValue() - getMinimum()) / (getMaximum() - getMinimum()) * (numFr - 1)); 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); g.drawImage (kni, 0, 0, getWidth(), getHeight(), 0, h2 * ofs, w2, h2);
} }

View File

@ -99,7 +99,7 @@ public:
{ {
offset = 1; offset = 1;
} }
g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality);
g.drawImage(kni, 0, 0, getWidth(), getHeight(), 0, offset * h2, w2, h2); g.drawImage(kni, 0, 0, getWidth(), getHeight(), 0, offset * h2, w2, h2);
} }

View File

@ -449,8 +449,11 @@ void ObxdAudioProcessorEditor::paint(Graphics& g)
if (skinFolder.exists() && mainFile.exists()) 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, g.drawImage (image,
0, 0, image.getWidth()/2, image.getHeight()/2, // /2 preliminar retina support 0, 0, image.getWidth()/2, image.getHeight()/2, // /2 preliminar retina support
0, 0, image.getWidth(), image.getHeight()); 0, 0, image.getWidth(), image.getHeight());
@ -458,7 +461,9 @@ void ObxdAudioProcessorEditor::paint(Graphics& g)
else else
{ {
const Image image = ImageCache::getFromMemory(BinaryData::main_png, BinaryData::main_pngSize); const Image image = ImageCache::getFromMemory(BinaryData::main_png, BinaryData::main_pngSize);
g.setImageResamplingQuality(Graphics::ResamplingQuality::highResamplingQuality);
g.drawImage (image, g.drawImage (image,
0, 0, image.getWidth(), image.getHeight(), 0, 0, image.getWidth(), image.getHeight(),
0, 0, image.getWidth(), image.getHeight()); 0, 0, image.getWidth(), image.getHeight());