Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
ImageSource Struct Reference

#include <imagesource.h>

+ Collaboration diagram for ImageSource:

Public Member Functions

 ImageSource ()
 
video::IImage * generateImage (std::string_view name, std::set< std::string > &source_image_names)
 
void insertSourceImage (const std::string &name, video::IImage *img, bool prefer_local)
 

Static Public Member Functions

static video::SColor getImageAverageColor (const video::IImage &image)
 

Private Member Functions

bool generateImagePart (std::string_view part_of_name, video::IImage *&baseimg, std::set< std::string > &source_image_names)
 

Private Attributes

bool m_setting_mipmap
 
bool m_setting_trilinear_filter
 
bool m_setting_bilinear_filter
 
bool m_setting_anisotropic_filter
 
SourceImageCache m_sourcecache
 

Constructor & Destructor Documentation

◆ ImageSource()

ImageSource::ImageSource ( )

Member Function Documentation

◆ generateImage()

video::IImage * ImageSource::generateImage ( std::string_view name,
std::set< std::string > & source_image_names )

Generates an image from a full string like "stone.png^mineral_coal.png^[crack:1:0". The returned Image should be dropped. source_image_names is important to determine when to flush the image from a cache (dynamic media)

References blit_with_alpha(), errorstream, generateImage(), and generateImagePart().

Referenced by generateImage(), generateImagePart(), TextureSource::generateTexture(), TextureSource::getPalette(), and TextureSource::rebuildTexture().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generateImagePart()

◆ getImageAverageColor()

video::SColor ImageSource::getImageAverageColor ( const video::IImage & image)
static

Referenced by TextureSource::getTextureAverageColor().

+ Here is the caller graph for this function:

◆ insertSourceImage()

void ImageSource::insertSourceImage ( const std::string & name,
video::IImage * img,
bool prefer_local )

References SourceImageCache::insert(), and m_sourcecache.

Referenced by TextureSource::insertSourceImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_setting_anisotropic_filter

bool ImageSource::m_setting_anisotropic_filter
private

Referenced by generateImagePart().

◆ m_setting_bilinear_filter

bool ImageSource::m_setting_bilinear_filter
private

Referenced by generateImagePart().

◆ m_setting_mipmap

bool ImageSource::m_setting_mipmap
private

Referenced by generateImagePart().

◆ m_setting_trilinear_filter

bool ImageSource::m_setting_trilinear_filter
private

Referenced by generateImagePart().

◆ m_sourcecache

SourceImageCache ImageSource::m_sourcecache
private

The documentation for this struct was generated from the following files: