Can now display SVGs, also fixed bad function call bug when taking screenshot
This commit is contained in:
parent
6d8d532952
commit
91603e1fc1
9 changed files with 70 additions and 28 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "ResourceManager.hpp"
|
||||
#include "Helpers/Networking/NetLibrary.hpp"
|
||||
#include <include/core/SkImage.h>
|
||||
#include "ResourceDisplay/SvgResourceDisplay.hpp"
|
||||
#include "Server/CommandList.hpp"
|
||||
#include "ResourceDisplay/ImageResourceDisplay.hpp"
|
||||
#include "ResourceDisplay/FileResourceDisplay.hpp"
|
||||
|
|
@ -121,6 +122,12 @@ std::shared_ptr<ResourceDisplay> ResourceManager::get_display_data(const ServerC
|
|||
return imgResource;
|
||||
}
|
||||
|
||||
auto svgResource(std::make_shared<SvgResourceDisplay>());
|
||||
if(svgResource->load(resourceIt->second.name, *resourceIt->second.data)) {
|
||||
displays[fileID] = svgResource;
|
||||
return svgResource;
|
||||
}
|
||||
|
||||
auto fileResource(std::make_shared<FileResourceDisplay>());
|
||||
fileResource->load(resourceIt->second.name, *resourceIt->second.data);
|
||||
displays[fileID] = fileResource;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue