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);
53 static float round(
float v,
float fraction);
55 static std::string
id(
const std::string& name,
float hscale,
float vscale);
57 std::map<std::string, std::shared_ptr<Surface>>
m_cache;
Internal image cache.
Definition imagecache.h:34
std::shared_ptr< Surface > get(const std::string &uri, float hscale=1.0, float vscale=1.0, bool approximate=true)
Get an image surface.
std::map< std::string, std::shared_ptr< Surface > > m_cache
Definition imagecache.h:57
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)
void clear()
Clear the image cache.
EGT_API ImageCache & image_cache()
Global image cache instance.
EGT framework namespace.
Definition animation.h:24