cpp-sdl2
C++ header-only SDL2 wrapper
|
Lock object that permit to access pixels directly on texture. More...
#include <texture.hpp>
Public Member Functions | |
Pixel | at (Vec2i const &pos) const |
Get pixel at given location on texture. More... | |
Pixel | at (size_t x, size_t y) const |
Get pixel at given location on texture. More... | |
Pixel | operator[] (Vec2i const &pos) const |
Get pixel at location with operator[]. More... | |
~Lock () | |
Automatically unlock texture. More... | |
Private Member Functions | |
Lock (SDL_Texture *texture, SDL_Rect const *rect) | |
private ctor to create a lock. Lock are created by Texture class More... | |
Private Attributes | |
SDL_Texture * | texture_ |
pointer to raw texure More... | |
void * | pixels_ |
pointer to pixel array More... | |
int | pitch_ |
Pixel pitch. More... | |
SDL_PixelFormat * | format_ |
Pixel format. More... | |
Friends | |
class | Texture |
Lock object that permit to access pixels directly on texture.
Definition at line 21 of file texture.hpp.
|
inline |
Automatically unlock texture.
Definition at line 40 of file texture.hpp.
|
inlineprivate |
Get pixel at given location on texture.
Definition at line 27 of file texture.hpp.
References at().
Referenced by at(), and operator[]().
|
inline |
Get pixel at given location on texture.
Definition at line 29 of file texture.hpp.
|
friend |
Definition at line 23 of file texture.hpp.
Referenced by sdl::Texture::operator=(), and sdl::Texture::Texture().
|
private |
|
private |
|
private |
|
private |
pointer to raw texure
Definition at line 63 of file texture.hpp.
Referenced by sdl::Texture::access(), sdl::Texture::alphamod(), sdl::Texture::blendmode(), sdl::Texture::colormod(), sdl::Texture::format(), Lock(), sdl::Texture::lock(), sdl::Texture::operator=(), sdl::Texture::ptr(), sdl::Texture::set_alphamod(), sdl::Texture::set_blendmode(), sdl::Texture::set_colormod(), sdl::Texture::size(), sdl::Texture::Texture(), ~Lock(), and sdl::Texture::~Texture().