Minetest  5.4.0
guiscalingfilter.cpp File Reference
#include "guiscalingfilter.h"
#include "imagefilters.h"
#include "porting.h"
#include "settings.h"
#include "util/numeric.h"
#include <cstdio>
#include "client/renderingengine.h"
#include "client/tile.h"
+ Include dependency graph for guiscalingfilter.cpp:

Functions

void guiScalingCache (const io::path &key, video::IVideoDriver *driver, video::IImage *value)
 
void guiScalingCacheClear ()
 
video::ITexture * guiScalingResizeCached (video::IVideoDriver *driver, video::ITexture *src, const core::rect< s32 > &srcrect, const core::rect< s32 > &destrect)
 
video::ITexture * guiScalingImageButton (video::IVideoDriver *driver, video::ITexture *src, s32 width, s32 height)
 
void draw2DImageFilterScaled (video::IVideoDriver *driver, video::ITexture *txr, const core::rect< s32 > &destrect, const core::rect< s32 > &srcrect, const core::rect< s32 > *cliprect, const video::SColor *const colors, bool usealpha)
 
void draw2DImage9Slice (video::IVideoDriver *driver, video::ITexture *texture, const core::rect< s32 > &rect, const core::rect< s32 > &middle, const core::rect< s32 > *cliprect, const video::SColor *const colors)
 

Variables

std::map< io::path, video::IImage * > g_imgCache
 
std::map< io::path, video::ITexture * > g_txrCache
 

Function Documentation

◆ draw2DImage9Slice()

void draw2DImage9Slice ( video::IVideoDriver *  driver,
video::ITexture *  texture,
const core::rect< s32 > &  rect,
const core::rect< s32 > &  middle,
const core::rect< s32 > *  cliprect,
const video::SColor *const  colors 
)

References draw2DImageFilterScaled().

Referenced by GUIBackgroundImage::draw(), and GUIButton::draw().

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

◆ draw2DImageFilterScaled()

void draw2DImageFilterScaled ( video::IVideoDriver *  driver,
video::ITexture *  txr,
const core::rect< s32 > &  destrect,
const core::rect< s32 > &  srcrect,
const core::rect< s32 > *  cliprect,
const video::SColor *const  colors,
bool  usealpha 
)

References guiScalingResizeCached().

Referenced by RenderingEngine::_draw_load_screen(), GUIAnimatedImage::draw(), GUIBackgroundImage::draw(), draw2DImage9Slice(), GUIEngine::drawBackground(), Hud::drawCompassTranslate(), GUIEngine::drawFooter(), GUIEngine::drawHeader(), Hud::drawItem(), Hud::drawItems(), drawItemStack(), Hud::drawLuaElements(), GUIEngine::drawOverlay(), and Hud::drawStatbar().

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

◆ guiScalingCache()

void guiScalingCache ( const io::path &  key,
video::IVideoDriver *  driver,
video::IImage *  value 
)

References g_imgCache, g_settings, and Settings::getBool().

Referenced by TextureSource::generateTexture(), and TextureSource::rebuildImagesAndTextures().

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

◆ guiScalingCacheClear()

void guiScalingCacheClear ( )

References g_imgCache, g_txrCache, and RenderingEngine::get_video_driver().

Referenced by Client::afterContentReceived().

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

◆ guiScalingImageButton()

video::ITexture* guiScalingImageButton ( video::IVideoDriver *  driver,
video::ITexture *  src,
s32  width,
s32  height 
)

References guiScalingResizeCached().

Referenced by load_button_texture(), GUIButton::setFromStyle(), and GUIButtonImage::setFromStyle().

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

◆ guiScalingResizeCached()

video::ITexture* guiScalingResizeCached ( video::IVideoDriver *  driver,
video::ITexture *  src,
const core::rect< s32 > &  srcrect,
const core::rect< s32 > &  destrect 
)

References g_imgCache, g_settings, g_txrCache, Settings::getBool(), imageCleanTransparent(), imageScaleNNAA(), porting::mt_snprintf(), and npot2().

Referenced by draw2DImageFilterScaled(), and guiScalingImageButton().

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

Variable Documentation

◆ g_imgCache

std::map<io::path, video::IImage *> g_imgCache

◆ g_txrCache

std::map<io::path, video::ITexture *> g_txrCache