2
0
Fork 0

Bitmap resize and demo conditional

This commit is contained in:
George Reales 2020-05-21 09:20:47 +02:00
parent a3c9546ace
commit 82f18790d1
3 changed files with 16 additions and 5 deletions

View File

@ -452,10 +452,8 @@ void ObxdAudioProcessorEditor::paint(Graphics& g)
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()/2, image.getHeight()/2, // TODO this resize should be done on resized()
0, 0, image.getWidth(), image.getHeight());
}
else
@ -468,4 +466,15 @@ void ObxdAudioProcessorEditor::paint(Graphics& g)
0, 0, image.getWidth(), image.getHeight(),
0, 0, image.getWidth(), image.getHeight());
}
}
void ObxdAudioProcessorEditor::resized()
{
/* Not working
const Image image = gin::applyResize (ImageCache::getFromFile(mainFile), 0.5);
*/
}

View File

@ -36,7 +36,8 @@ public:
void mouseUp (const MouseEvent& e) override;
void paint (Graphics& g) override;
void resized() override;
//==============================================================================
void changeListenerCallback (ChangeBroadcaster* source) override;
void buttonClicked (Button *) override;

View File

@ -413,10 +413,11 @@ void ObxdAudioProcessor::setStateInformation(const void* data, int sizeInBytes)
{
bindings.controllers[i] = xmlState->getIntAttribute(String(i), 0);
}
#if ! DEMOVERSION
setCurrentProgram(xmlState->getIntAttribute(S("currentProgram"), 0));
sendChangeMessage();
#endif
#if JUCE_VERSION <= JUCE_543
delete xmlState;
#endif