Btk
Btk::PixBuf Class Reference

Public Member Functions

 PixBuf (SDL_Surface *s=nullptr)
 
 PixBuf (int w, int h, Uint32 format)
 
 PixBuf (std::string_view file)
 
 PixBuf (const PixBuf &)=delete
 
 PixBuf (PixBuf &&s)
 
PixBuf clone () const
 
PixBuf ref () const
 
void save_png (RWops &, int quality)
 
void save_jpg (RWops &, int quality)
 
void save_bmp (RWops &)
 
void save_png (std::string_view fname, int quality)
 
void save_jpg (std::string_view fname, int quality)
 
void save_bmp (std::string_view fname)
 
PixBufoperator= (SDL_Surface *)
 
PixBufoperator= (PixBuf &&)
 
bool empty () const noexcept
 
Size size () const noexcept
 
int w () const noexcept
 
int h () const noexcept
 
int refcount () const noexcept
 
int pitch () const noexcept
 
size_t pixels_size () const noexcept
 
bool must_lock () const noexcept
 
template<class T = void>
T * pixels () const noexcept
 
SDL_Surface * get () const noexcept
 
SDL_Surface * operator-> () const noexcept
 
void lock () const
 
void unlock () const noexcept
 
void set_rle (bool val=true)
 
PixBuf convert (Uint32 fmt) const
 Convert a pixbuf's format. More...
 

Static Public Member Functions

static PixBuf FromFile (std::string_view file)
 
static PixBuf FromFile (FILE *f)
 
static PixBuf FromMem (const void *mem, size_t size)
 
static PixBuf FromRWops (RWops &)
 
static PixBuf FromXPMArray (const char *const *)
 

Member Function Documentation

◆ convert()

PixBuf Btk::PixBuf::convert ( Uint32  fmt) const

Convert a pixbuf's format.

Parameters
fmtThe format
Returns
PixBuf The pixel buf

The documentation for this class was generated from the following files: