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
86 return a.get() <
b.get();
92 stream <<
"<null surface>";
93 }
else if(!surf->format) {
94 stream <<
"<invalid surface>";
96 stream <<
"{ " << surf->w <<
'x' << surf->h <<
'@'
97 << unsigned(surf->format->BitsPerPixel) <<
"bpp"
98 << (surf->format->palette ?
" indexed" :
"")
99 <<
" clip_rect=[" << surf->clip_rect
100 <<
"] 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.
bool operator<(const surface &a, const surface &b)
std::ostream & operator<<(std::ostream &stream, const surface &surf)