6#ifndef EGT_DETAIL_IMAGECACHE_H
7#define EGT_DETAIL_IMAGECACHE_H
9#include <egt/detail/meta.h>
10#include <egt/painter.h>
11#include <egt/surface.h>
40 std::shared_ptr<Surface>
get(
const std::string& uri,
41 float hscale = 1.0,
float vscale = 1.0,
42 bool approximate =
true,
43 bool is_cached =
false);
54 static float round(
float v,
float fraction);
56 static std::string
id(
const std::string& name,
float hscale,
float vscale);
58 std::map<std::string, std::shared_ptr<Surface>>
m_cache;
Internal image cache.
Definition imagecache.h:34
std::map< std::string, std::shared_ptr< Surface > > m_cache
Definition imagecache.h:58
static Surface resize(const Surface &surface, const Size &size)
static float round(float v, float fraction)
static std::string id(const std::string &name, float hscale, float vscale)
std::shared_ptr< Surface > get(const std::string &uri, float hscale=1.0, float vscale=1.0, bool approximate=true, bool is_cached=false)
Get an image surface.
void clear()
Clear the image cache.
EGT_API ImageCache & image_cache()
Global image cache instance.
EGT framework namespace.
Definition animation.h:24