24#include <unordered_map>
46 struct error_parsing_image_pattern : std::logic_error { error_parsing_image_pattern() : std::logic_error(
"neogfx::image::error_parsing_image_pattern") {} };
47 struct no_resource : std::logic_error { no_resource() :
std::logic_error(
"neogfx::image::no_resource") {} };
68 const void*
cdata()
const override;
69 const void*
data()
const override;
71 std::size_t
size()
const override;
87 bool has_resource()
const;
95 std::optional<string> iError;
100 mutable cache<data_type> iHash;
void set_pixel(const point &aPoint, const color &aColor) override
double downloading_progress() const override
texture_data_format data_format() const override
color get_pixel(const point &aPoint) const override
i_string const & error_string() const override
void resize(const neogfx::size &aNewSize) override
define_declared_event(Downloaded, downloaded) define_declared_event(FailedToDownload
const void * cpixels() const override
const void * data() const override
neogfx::color_format color_format() const override
image(std::string const &aUri, std::string const &aImagePattern, const std::unordered_map< std::string, color > &aColorMap, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
hash_digest_type const & hash() const override
data_type hash_digest_type
neogfx::color_space color_space() const override
texture_sampling sampling() const override
const void * cdata() const override
image(image &&aOther, texture_sampling aSampling)
image(std::string const &aImagePattern, const std::unordered_map< std::string, color > &aColorMap, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
std::size_t size() const override
i_string const & uri() const override
bool is_empty() const override
image(image const &aOther, texture_sampling aSampling)
image(image const &aOther)
dimension dpi_scale_factor() const override
bool downloading() const override
bool available() const override
image(const neogfx::size &aSize, const color &aColor=color::Black, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
image(dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
const void * pixels() const override
neolib::vector< uint8_t > data_type
bool error() const override
const neogfx::size & extents() const override
image(std::string const &aUri, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
static const sRGB_color Black
default_geometry_value_type dimension
#define define_declared_event(name, declName,...)