cpp-sdl2
C++ header-only SDL2 wrapper
|
Represent a lock to safely access surface content. More...
#include <surface.hpp>
Public Member Functions | |
Pixel | at (Vec2i const &pos) const |
Get pixel at given coordinates inside surface. More... | |
Pixel | at (size_t x, size_t y) const |
Get pixel at specified location inside surface. More... | |
Pixel | operator[] (Vec2i const &pos) const |
Get pixel at specified location via operator[]. More... | |
void * | raw_array () const |
Get access to the raw array of pixels. More... | |
~Lock () | |
Free the lock. More... | |
Private Member Functions | |
constexpr | Lock (SDL_Surface &surface_) |
Private constructor for lock object. More... | |
Private Attributes | |
SDL_Surface * | surface_ |
Raw pointer to the surface. More... | |
Friends | |
class | Surface |
Represent a lock to safely access surface content.
Definition at line 25 of file surface.hpp.
|
inline |
|
inlineprivate |
Private constructor for lock object.
Definition at line 52 of file surface.hpp.
Get pixel at given coordinates inside surface.
Definition at line 31 of file surface.hpp.
References at().
Referenced by at(), and operator[]().
|
inline |
Get pixel at specified location inside surface.
Definition at line 33 of file surface.hpp.
References surface_.
Get pixel at specified location via operator[].
Definition at line 42 of file surface.hpp.
References at().
|
inline |
Get access to the raw array of pixels.
Definition at line 45 of file surface.hpp.
References surface_.
|
friend |
Definition at line 27 of file surface.hpp.
Referenced by sdl::Surface::Surface().
|
private |
Raw pointer to the surface.
Definition at line 55 of file surface.hpp.
Referenced by sdl::Surface::alphamod(), at(), sdl::Surface::blendmode(), sdl::Surface::blit_on(), sdl::Surface::cliprect(), sdl::Surface::colorkey(), sdl::Surface::colormod(), sdl::Surface::disable_colorkey(), sdl::Surface::flags(), sdl::Surface::format(), sdl::Surface::has_colorkey(), sdl::Surface::height(), sdl::Surface::lock(), sdl::Surface::operator=(), sdl::Surface::pixelformat(), sdl::Surface::ptr(), raw_array(), sdl::Surface::set_alphamod(), sdl::Surface::set_blendmode(), sdl::Surface::set_colorkey(), sdl::Surface::set_colormod(), sdl::Surface::Surface(), sdl::Surface::width(), sdl::Surface::with_format(), ~Lock(), and sdl::Surface::~Surface().