95 operator SDL_Surface*()
const {
return surface_; }
163 SDL_Rect final_rect = { 0, 0, 0, 0 };
166 SDL_IntersectRect(&
rect_, r, &final_rect);
172 SDL_SetClipRect(
surface_, &final_rect);
Helper class for pinning SDL surfaces into memory.
utils::const_clone_t< uint32_t, T > pixel_t
void assign_surface_internal(SDL_Surface *surf)
surface & operator=(surface &&s) noexcept
bool is_neutral() const
Check that the surface is neutral bpp 32.
surface(const surface &s)
static const SDL_PixelFormat neutral_pixel_format
SDL_Surface * operator->() const
surface clone() const
Makes a copy of this surface.
int area() const
Total area of the surface in square pixels.
surface(surface &&s) noexcept
SDL_Surface * get() const
static void add_surface_ref(SDL_Surface *surf)
surface & operator=(const surface &s)
surface & make_neutral()
Converts this surface to a neutral format if it is not already.
typename const_clone< D, S >::type const_clone_t
Contains the SDL_Rect helper code.
clip_rect_setter(const surface &surf, const SDL_Rect *r, bool operate=true)
std::ostream & operator<<(std::ostream &stream, const surface &surf)
static map_location::direction s