The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions
picture.hpp File Reference
#include "map/location.hpp"
#include "terrain/translation.hpp"
#include "utils/optional_fwd.hpp"
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.

Classes

class  image::locator
 Generic locator abstracting the location of an image. More...
 
struct  image::light_adjust
 Type used to store color information of central and adjacent hexes. More...
 
struct  image::manager
 Image cache manager. More...
 

Namespaces

namespace  image
 Functions to load and save images from/to disk.
 

Enumerations

enum  image::TYPE { image::UNSCALED , image::HEXED , image::TOD_COLORED , image::NUM_TYPES }
 Used to specify the rendering format of images. More...
 
enum class  image::scale_quality { image::nearest , image::linear }
 
enum class  image::save_result { image::success , image::unsupported_format , image::save_failed , image::no_image }
 

Functions

std::ostream & image::operator<< (std::ostream &s, const locator &l)
 
void image::flush_cache ()
 Purges all image caches.
 
void image::set_color_adjustment (int r, int g, int b)
 Changes Time of Day color tint for all applicable image types.
 
surface image::get_surface (const locator &i_locator, TYPE type=UNSCALED, bool skip_cache=false)
 Returns an image surface suitable for software manipulation.
 
texture image::get_texture (const locator &i_locator, TYPE type=UNSCALED, bool skip_cache=false)
 Returns an image texture suitable for hardware-accelerated rendering.
 
texture image::get_texture (const image::locator &i_locator, scale_quality quality, TYPE type, bool skip_cache)
 Returns a texture for the corresponding image.
 
surface image::get_lighted_image (const image::locator &i_locator, const std::vector< light_adjust > &ls)
 Caches and returns an image with a lightmap applied to it.
 
texture image::get_lighted_texture (const image::locator &i_locator, const std::vector< light_adjust > &ls)
 
surface image::get_hexmask ()
 Retrieves the standard hexagonal tile mask.
 
point image::get_size (const locator &i_locator, bool skip_cache=false)
 Returns the width and height of an image.
 
bool image::is_in_hex (const locator &i_locator)
 Checks if an image fits into a single hex.
 
bool image::is_empty_hex (const locator &i_locator)
 Checks if an image is empty after hex masking.
 
bool image::exists (const locator &i_locator)
 Returns true if the given image actually exists, without loading it.
 
void image::precache_file_existence (const std::string &subdir="")
 Precache the existence of files in a binary path subdirectory (e.g.
 
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)