MCPcopy Create free account
hub / github.com/amsynth/amsynth / getImage

Method getImage

src/core/gui/ControlPanel.cpp:56–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 }
55
56 juce::Image getImage(const LayoutDescription::Resource& resource)
57 {
58 if (images_.find(resource.file) != images_.end()) {
59 return images_.at(resource.file);
60 } else {
61 auto path = directory.getChildFile(resource.file).getFullPathName();
62 return images_[resource.file] = juce::ImageFileFormat::loadFrom(path);
63 }
64 }
65
66private:
67 std::unordered_map<std::string, juce::Image> images_;

Callers 1

ImplMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected