Remove sdl::fill_surface_rect

This commit is contained in:
Charles Dang 2024-08-19 15:45:33 -04:00
parent 4722c01c55
commit f6ae75f9ed
2 changed files with 1 additions and 15 deletions

View file

@ -603,9 +603,7 @@ static surface get_hexed(const locator& i_locator, bool skip_cache = false)
// if the image is too large in either dimension, crop it.
if(image->w > mask->w || image->h >= mask->h) {
// fill the crop surface with transparency
sdl::fill_surface_rect(fit, nullptr,
SDL_MapRGBA(fit->format, 0, 0, 0, 0)
);
SDL_FillRect(fit, nullptr, SDL_MapRGBA(fit->format, 0, 0, 0, 0));
// crop the input image to hexmask dimensions
int cutx = std::max(0, image->w - mask->w) / 2;
int cuty = std::max(0, image->h - mask->h) / 2;

View file

@ -36,18 +36,6 @@ version_info get_version();
*/
bool runtime_at_least(uint8_t major, uint8_t minor = 0, uint8_t patch = 0);
/**
* Fill a rectangle on a given surface. Alias for SDL_FillRect.
*
* @param dst The surface to operate on.
* @param dst_rect The rectangle to fill.
* @param color Color of the rectangle.
*/
inline void fill_surface_rect(surface& dst, SDL_Rect* dst_rect, const uint32_t color)
{
SDL_FillRect(dst, dst_rect, color);
}
} // namespace sdl