21 return *SDL_CreateRGBSurfaceWithFormat(0, 1, 1, 32, SDL_PIXELFORMAT_ARGB8888)->format;
34 throw std::invalid_argument(
"Creating surface with negative dimensions");
43 && SDL_ISPIXELFORMAT_INDEXED(
surface_->format->format) == SDL_FALSE
44 &&
surface_->format->BytesPerPixel == 4
87 stream <<
"<null surface>";
88 }
else if(!
surf->format) {
89 stream <<
"<invalid surface>";
91 stream <<
"{ " <<
surf->w <<
'x' <<
surf->h <<
'@'
92 << unsigned(
surf->format->BitsPerPixel) <<
"bpp"
93 << (
surf->format->palette ?
" indexed" :
"")
94 <<
" clip_rect=[" <<
surf->clip_rect
95 <<
"] refcount=" <<
surf->refcount
void assign_surface_internal(SDL_Surface *surf)
bool is_neutral() const
Check that the surface is neutral bpp 32.
static const SDL_PixelFormat neutral_pixel_format
surface clone() const
Makes a copy of this surface.
SDL_Surface * get() const
static void add_surface_ref(SDL_Surface *surf)
surface & make_neutral()
Converts this surface to a neutral format if it is not already.
constexpr uint32_t SDL_ALPHA_MASK
constexpr uint32_t SDL_RED_MASK
Contains the SDL_Rect helper code.
std::ostream & operator<<(std::ostream &stream, const surface &surf)