#include "imagesource.h"
#include <IFileSystem.h>
#include "settings.h"
#include "mesh.h"
#include "util/strfnd.h"
#include "renderingengine.h"
#include "util/base64.h"
#include "irrlicht_changes/printing.h"
#include "imagefilters.h"
#include "texturepaths.h"
#include "util/numeric.h"
Macros | |
#define | CHECK_BASEIMG() |
#define | COMPLAIN_INVALID(description) |
#define | CHECK_DIM(w, h) |
Functions | |
template<bool overlay = false> | |
static void | blit_with_alpha (video::IImage *src, video::IImage *dst, v2s32 dst_pos, v2u32 size) |
Draw an image on top of another one with gamma-incorrect alpha compositing. | |
static void | apply_colorize (video::IImage *dst, v2u32 dst_pos, v2u32 size, const video::SColor color, int ratio, bool keep_alpha) |
static void | apply_multiplication (video::IImage *dst, v2u32 dst_pos, v2u32 size, const video::SColor color) |
static void | apply_screen (video::IImage *dst, v2u32 dst_pos, v2u32 size, const video::SColor color) |
static void | apply_hue_saturation (video::IImage *dst, v2u32 dst_pos, v2u32 size, s32 hue, s32 saturation, s32 lightness, bool colorize) |
static void | apply_overlay (video::IImage *overlay, video::IImage *dst, v2s32 overlay_pos, v2s32 dst_pos, v2u32 size, bool hardlight) |
static void | apply_brightness_contrast (video::IImage *dst, v2u32 dst_pos, v2u32 size, s32 brightness, s32 contrast) |
static void | apply_mask (video::IImage *mask, video::IImage *dst, v2s32 mask_pos, v2s32 dst_pos, v2u32 size) |
static void | draw_crack (video::IImage *crack, video::IImage *dst, bool use_overlay, s32 frame_count, s32 progression, video::IVideoDriver *driver, u8 tiles=1) |
void | brighten (video::IImage *image) |
u32 | parseImageTransform (std::string_view s) |
core::dimension2d< u32 > | imageTransformDimension (u32 transform, core::dimension2d< u32 > dim) |
void | imageTransform (u32 transform, video::IImage *src, video::IImage *dst) |
static void | applyShadeFactor (video::SColor &color, u32 factor) |
static video::IImage * | createInventoryCubeImage (video::IImage *top, video::IImage *left, video::IImage *right) |
static std::string | unescape_string (const std::string &str, const char esc='\\') |
void | upscaleImagesToMatchLargest (video::IImage *&img1, video::IImage *&img2) |
void | blitBaseImage (video::IImage *&src, video::IImage *&dst) |
template<bool overlay> | |
void | blit_with_alpha (video::IImage *src, video::IImage *dst, v2s32 dst_pos, v2u32 size) |
Draw an image on top of another one with gamma-incorrect alpha compositing. | |
video::IImage * | create_crack_image (video::IImage *crack, s32 frame_index, core::dimension2d< u32 > size, u8 tiles, video::IVideoDriver *driver) |
#define CHECK_BASEIMG | ( | ) |
#define CHECK_DIM | ( | w, | |
h | |||
) |
#define COMPLAIN_INVALID | ( | description | ) |
|
static |
References blend.
Referenced by ImageSource::generateImagePart().
|
inlinestatic |
|
static |
Draw an image on top of another one with gamma-incorrect alpha compositing.
This exists because IImage::copyToWithAlpha() doesn't seem to always work.
overlay | If enabled, only modify pixels in dst which are fully opaque. Defaults to false. |
src | Top image. This image must have the ECF_A8R8G8B8 color format. |
dst | Bottom image. The top image is drawn onto this base image in-place. |
dst_pos | An offset vector to move src before drawing it onto dst |
size | Size limit of the copied area |
References RenderingEngine::get_video_driver().
Referenced by blitBaseImage(), ImageSource::generateImage(), and ImageSource::generateImagePart().
void blit_with_alpha | ( | video::IImage * | src, |
video::IImage * | dst, | ||
v2s32 | dst_pos, | ||
v2u32 | size | ||
) |
Draw an image on top of another one with gamma-incorrect alpha compositing.
This exists because IImage::copyToWithAlpha() doesn't seem to always work.
overlay | If enabled, only modify pixels in dst which are fully opaque. Defaults to false. |
src | Top image. This image must have the ECF_A8R8G8B8 color format. |
dst | Bottom image. The top image is drawn onto this base image in-place. |
dst_pos | An offset vector to move src before drawing it onto dst |
size | Size limit of the copied area |
References RenderingEngine::get_video_driver().
Referenced by blitBaseImage(), ImageSource::generateImage(), and ImageSource::generateImagePart().
void blitBaseImage | ( | video::IImage *& | src, |
video::IImage *& | dst | ||
) |
References blit_with_alpha(), and upscaleImagesToMatchLargest().
Referenced by ImageSource::generateImagePart().
void brighten | ( | video::IImage * | image | ) |
video::IImage * create_crack_image | ( | video::IImage * | crack, |
s32 | frame_index, | ||
core::dimension2d< u32 > | size, | ||
u8 | tiles, | ||
video::IVideoDriver * | driver | ||
) |
|
static |
References applyShadeFactor(), RenderingEngine::get_video_driver(), npot2(), and sanity_check.
Referenced by ImageSource::generateImagePart().
|
static |
References create_crack_image().
Referenced by ImageSource::generateImagePart().
void imageTransform | ( | u32 | transform, |
video::IImage * | src, | ||
video::IImage * | dst | ||
) |
References imageTransformDimension().
Referenced by ImageSource::generateImagePart().
core::dimension2d< u32 > imageTransformDimension | ( | u32 | transform, |
core::dimension2d< u32 > | dim | ||
) |
Referenced by ImageSource::generateImagePart(), and imageTransform().
u32 parseImageTransform | ( | std::string_view | s | ) |
References lowercase().
Referenced by ImageSource::generateImagePart().
|
static |
Referenced by Hud::drawLuaElements(), ImageSource::generateImagePart(), GUIFormSpecMenu::parseAnimatedImage(), GUIFormSpecMenu::parseBackground(), GUIFormSpecMenu::parseButton(), GUIFormSpecMenu::parseCheckbox(), GUIFormSpecMenu::parseDropDown(), GUIFormSpecMenu::parseHyperText(), GUIFormSpecMenu::parseImage(), GUIFormSpecMenu::parseImageButton(), GUIFormSpecMenu::parseItemImageButton(), GUIFormSpecMenu::parseLabel(), GUIFormSpecMenu::parseModel(), GUIFormSpecMenu::parsePwdField(), GUIFormSpecMenu::parseSimpleField(), GUIFormSpecMenu::parseStyle(), GUIFormSpecMenu::parseTabHeader(), GUIFormSpecMenu::parseTable(), GUIFormSpecMenu::parseTableColumns(), GUIFormSpecMenu::parseTableOptions(), GUIFormSpecMenu::parseTextArea(), GUIFormSpecMenu::parseTextList(), GUIFormSpecMenu::parseTooltip(), and GUIFormSpecMenu::parseVertLabel().
void upscaleImagesToMatchLargest | ( | video::IImage *& | img1, |
video::IImage *& | img2 | ||
) |
References RenderingEngine::get_video_driver().
Referenced by blitBaseImage(), and ImageSource::generateImagePart().