49 SDL_BlitSurface(
src, src_rect,
dst, dst_rect);
Represents version numbers.
std::unordered_map< color_t, color_t > color_range_map
Interfaces for manipulating version numbers of engine, add-ons, etc.
General math utility functions.
version_info get_version()
Returns the runtime SDL version.
bool runtime_at_least(uint8_t major, uint8_t minor=0, uint8_t patch=0)
Returns true if the runtime SDL version is at or greater than the specified version,...
void scale(size_t factor, const uint32_t *src, uint32_t *trg, int srcWidth, int srcHeight, ColorFormat colFmt, const ScalerCfg &cfg=ScalerCfg(), int yFirst=0, int yLast=std::numeric_limits< int >::max())
rect dst
Location on the final composed sheet.
rect src
Non-transparent portion of the surface to compose.
std::string filename
Filename.
The basic class for representing 8-bit RGB or RGBA colour values.
An abstract description of a rectangle with integer coordinates.
void mask_surface(surface &surf, const surface &mask, bool *empty_result=nullptr, const std::string &filename=std::string())
Applies a mask on a surface.
void blend_surface(surface &surf, const double amount, const color_t color)
Blends a surface with a color.
void sepia_image(surface &surf)
void flip_surface(surface &surf)
void recolor_image(surface &surf, const color_range_map &map_rgb)
Recolors a surface using a map with source and converted palette values.
surface get_surface_portion(const surface &surf, SDL_Rect &rect)
Get a portion of the screen.
surface scale_surface_legacy(const surface &surf, int w, int h)
Scale a surface using simple bilinear filtering (discarding rgb from source pixels with 0 alpha)
void wipe_alpha(surface &surf)
void brighten_image(surface &surf, int32_t amount)
void greyscale_image(surface &surf)
void adjust_surface_alpha(surface &surf, uint8_t alpha_mod)
void swap_channels_image(surface &surf, channel r, channel g, channel b, channel a)
void blur_alpha_surface(surface &surf, int depth=1)
Cross-fades a surface with alpha channel.
void negative_image(surface &surf, const int thresholdR, const int thresholdG, const int thresholdB)
void adjust_surface_color(surface &surf, int r, int g, int b)
void alpha_to_greyscale(surface &surf)
rect get_non_transparent_portion(const surface &surf)
void shadow_image(surface &surf, int scale=1)
create an heavy shadow of the image, by blurring, increasing alpha and darkening
void sdl_blit(const surface &src, const SDL_Rect *src_rect, surface &dst, SDL_Rect *dst_rect)
void monochrome_image(surface &surf, const int threshold)
surface cut_surface(const surface &surf, const SDL_Rect &r)
Cuts a rectangle from a surface.
void light_surface(surface &surf, const surface &lightmap)
Light surf using lightmap.
void flop_surface(surface &surf)
surface scale_surface_xbrz(const surface &surf, std::size_t z)
Scale a surface using xBRZ algorithm.
surface scale_surface_sharp(const surface &surf, int w, int h)
Scale a surface using modified nearest neighbour algorithm.
void adjust_surface_alpha_add(surface &surf, int amount)
surface rotate_90_surface(const surface &surf, bool clockwise)
Rotates a surface 90 degrees.
surface rotate_180_surface(const surface &surf)
Rotates a surface 180 degrees.
surface scale_surface(const surface &surf, int w, int h)
Scale a surface using alpha-weighted modified bilinear filtering Note: causes artifacts with alpha gr...
surface rotate_any_surface(const surface &surf, float angle, int zoom, int offset)
Rotates a surface by any degrees.
void blur_surface(surface &surf, SDL_Rect rect, int depth=1)
Cross-fades a surface in place.
bool in_mask_surface(const surface &surf, const surface &mask)
Check if a surface fit into a mask.