55 SDL_Surface* surface_;
146 void* GetPixels()
const;
155 int GetPitch()
const;
163 const SDL_PixelFormat& GetFormat()
const;
173 explicit Surface(SDL_Surface* surface);
192 Surface(Uint32 flags,
int width,
int height,
int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
212 Surface(
void* pixels,
int width,
int height,
int depth,
int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
214#ifdef SDL2PP_WITH_IMAGE
233 explicit Surface(
const std::string& filename);
284 SDL_Surface* Get()
const;
297 Surface Convert(
const SDL_PixelFormat& format);
310 Surface Convert(Uint32 pixel_format);
324 void Blit(
const Optional<Rect>& srcrect,
Surface& dst,
const Rect& dstrect);
338 void BlitScaled(
const Optional<Rect>& srcrect,
Surface& dst,
const Optional<Rect>& dstrect);
360 Rect GetClipRect()
const;
372 Uint32 GetColorKey()
const;
384 Uint8 GetAlphaMod()
const;
396 SDL_BlendMode GetBlendMode()
const;
409 Color GetColorAndAlphaMod()
const;
423 void GetColorMod(Uint8& r, Uint8& g, Uint8& b)
const;
437 Surface& SetClipRect(
const Optional<Rect>& rect = NullOpt);
452 Surface& SetColorKey(
bool flag, Uint32 key);
466 Surface& SetAlphaMod(Uint8 alpha = 255);
480 Surface& SetBlendMode(SDL_BlendMode blendMode);
496 Surface& SetColorMod(Uint8 r = 255, Uint8 g = 255, Uint8 b = 255);
538 Surface& FillRect(
const Optional<Rect>& rect, Uint32 color);
552 Surface& FillRects(
const Rect* rects,
int count, Uint32 color);
560 int GetWidth()
const;
568 int GetHeight()
const;
576 Point GetSize()
const;
587 Uint32 GetFormat()
const;