32 SDL_BlitSurface(src, src_rect, dst, dst_rect);
36 SDL_SetSurfaceBlendMode(screen, SDL_BLENDMODE_NONE);
37 SDL_SetSurfaceBlendMode(dst, SDL_BLENDMODE_NONE);
38 SDL_BlitSurface(screen, screen_rect, dst, dst_rect);
39 SDL_SetSurfaceBlendMode(screen, SDL_BLENDMODE_BLEND);
57 const surface& surf,
const unsigned w);
74 const surface& surf,
const unsigned h);
246 ,
const double amount
263 int zoom,
int offset);
307 const SDL_Rect* srcrect,
surface& dst,
const SDL_Rect* dstrect);
surface rotate_any_surface(const surface &surf, float angle, int zoom, int offset)
Rotates a surface by any degrees.
surface cut_surface(const surface &surf, const SDL_Rect &r)
Cuts a rectangle from a surface.
surface scale_surface_nn(const surface &surf, int w, int h)
Scale a surface using the nearest neighbor algorithm (provided by xBRZ lib)
Interfaces for manipulating version numbers of engine, add-ons, etc.
surface greyscale_image(const surface &surf)
void blit_surface(const surface &src, const SDL_Rect *srcrect, surface &dst, const SDL_Rect *dstrect)
Replacement for sdl_blit.
surface alpha_to_greyscale(const surface &surf)
surface monochrome_image(const surface &surf, const int threshold)
surface stretch_surface_horizontal(const surface &surf, const unsigned w)
Stretches a surface in the horizontal direction.
surface flip_surface(const surface &surf)
surface rotate_180_surface(const surface &surf)
Rotates a surface 180 degrees.
bool in_mask_surface(const surface &surf, const surface &mask)
Check if a surface fit into a mask.
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 brighten_image(const surface &surf, fixed_t amount)
version_info sdl_get_version()
surface shadow_image(const surface &surf)
create an heavy shadow of the image, by blurring, increasing alpha and darkening
void draw_centered_on_background(surface surf, const SDL_Rect &rect, const color_t &color, surface target)
surface submerge_alpha(const surface &surf, int depth, float alpha_base, float alpha_delta)
Progressively reduce alpha of bottom part of the surface.
General math utility functions.
surface stretch_surface_vertical(const surface &surf, const unsigned h)
Stretches a surface in the vertical direction.
void put_pixel(const surface &surf, surface_lock &surf_lock, int x, int y, uint32_t pixel)
Helper methods for setting/getting a single pixel in an image.
surface adjust_surface_color(const surface &surf, int r, int g, int b)
surface mask_surface(const surface &surf, const surface &mask, bool *empty_result=nullptr, const std::string &filename=std::string())
Applies a mask on a surface.
surface recolor_image(surface surf, const color_range_map &map_rgb)
Recolors a surface using a map with source and converted palette values.
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) ...
surface adjust_surface_alpha_add(const surface &surf, int amount)
std::unordered_map< color_t, color_t > color_range_map
surface tile_surface(const surface &surf, int w, int h, bool centered=true)
Tile a surface.
surface get_surface_portion(const surface &surf, SDL_Rect &rect)
Get a portion of the screen.
Helper class for pinning SDL surfaces into memory.
surface wipe_alpha(const surface &surf)
uint32_t get_pixel(const surface &surf, const const_surface_lock &surf_lock, int x, int y)
Represents version numbers.
surface scale_surface_sharp(const surface &surf, int w, int h)
Scale a surface using modified nearest neighbour algorithm.
surface scale_surface_xbrz(const surface &surf, std::size_t z)
Scale a surface using xBRZ algorithm.
surface flop_surface(const surface &surf)
void adjust_surface_alpha(surface &surf, fixed_t amount)
surface blur_surface(const surface &surf, int depth=1)
Cross-fades a surface.
surface light_surface(const surface &surf, const surface &lightmap)
Light surf using lightmap.
surface swap_channels_image(const surface &surf, channel r, channel g, channel b, channel a)
void sdl_copy_portion(const surface &screen, SDL_Rect *screen_rect, surface &dst, SDL_Rect *dst_rect)
void sdl_blit(const surface &src, SDL_Rect *src_rect, surface &dst, SDL_Rect *dst_rect)
surface blend_surface(const surface &surf, const double amount, const color_t color)
Blends a surface with a color.
surface rotate_90_surface(const surface &surf, bool clockwise)
Rotates a surface 90 degrees.
SDL_Rect get_non_transparent_portion(const surface &surf)
surface blur_alpha_surface(const surface &surf, int depth=1)
Cross-fades a surface with alpha channel.
surface negative_image(const surface &surf, const int thresholdR, const int thresholdG, const int thresholdB)
surface sepia_image(const surface &surf)