The Battle for Wesnoth  1.15.12+dev
Classes | Namespaces | Typedefs | Enumerations | Functions
picture.hpp File Reference
#include "map/location.hpp"
#include "terrain/translation.hpp"
#include <unordered_map>
Include dependency graph for picture.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  image::cache_type< T >
class  image::locator
 Generic locator abstracting the location of an image. More...
struct  image::locator::value
struct  image::manager
 Image cache manager. More...


 Functions to load and save images from/to disk.


typedef cache_type< surfaceimage::image_cache
typedef cache_type< bool > image::bool_cache
typedef std::map< t_translation::terrain_code, surfaceimage::mini_terrain_cache_map
typedef std::basic_string< signed char > image::light_string
 Type used to store color information of central and adjacent hexes. More...
typedef std::map< light_string, surfaceimage::lit_variants
 Type used to pair light possibilities with the corresponding lit surface. More...
typedef cache_type< lit_variants > image::lit_cache
 Lit variants for each locator. More...


enum  image::TYPE {
  image::UNSCALED, image::SCALED_TO_ZOOM, image::HEXED, image::SCALED_TO_HEX,
 Used to specify the rendering format of images. More...
enum  image::save_result { image::save_result::success, image::save_result::unsupported_format, image::save_result::save_failed, image::save_result::no_image }


surface image::load_from_disk (const locator &loc)
light_string image::get_light_string (int op, int r, int g, int b)
 Returns the light_string for one light operation. More...
void image::flush_cache ()
 Purges all image caches. More...
void image::set_color_adjustment (int r, int g, int b)
 Changes Time of Day color tint for all applicable image types. More...
void image::set_zoom (unsigned int zoom)
 Sets the scaling factor for images. More...
surface image::get_image (const locator &i_locator, TYPE type=UNSCALED)
 Caches and returns an image. More...
surface image::get_lighted_image (const image::locator &i_locator, const light_string &ls, TYPE type)
 Caches and returns an image with a lightmap applied to it. More...
surface image::get_hexmask ()
 Retrieves the standard hexagonal tile mask. More...
bool image::is_in_hex (const locator &i_locator)
 Checks if an image fits into a single hex. More...
bool image::is_empty_hex (const locator &i_locator)
 Checks if an image is empty after hex masking. More...
surface image::reverse_image (const surface &surf)
 Horizontally flips an image. More...
bool image::exists (const locator &i_locator)
 Returns true if the given image actually exists, without loading it. More...
void image::precache_file_existence (const std::string &subdir="")
 Precache the existence of files in a binary path subdirectory (e.g. More...
bool image::precached_file_exists (const std::string &file)
save_result image::save_image (const locator &i_locator, const std::string &filename)
save_result image::save_image (const surface &surf, const std::string &filename)