SDL2pp::Surface lock.
More...
#include <SDL2pp/Surface.hh>
SDL2pp::Surface lock.
For direct pixel access, SDL surface may need to be locked. This class represents the lock and controls its lifetime as the lock is released as soon as LockHandle is destroyed.
◆ LockHandle() [1/3]
SDL2pp::Surface::LockHandle::LockHandle |
( |
| ) |
|
Create no-op lock.
This may be initialized with real lock later via move assignment
◆ ~LockHandle()
SDL2pp::Surface::LockHandle::~LockHandle |
( |
| ) |
|
◆ LockHandle() [2/3]
Move constructor.
- Parameters
-
◆ LockHandle() [3/3]
SDL2pp::Surface::LockHandle::LockHandle |
( |
const LockHandle & |
other | ) |
|
|
delete |
Deleted copy constructor.
This class is not copyable
◆ GetFormat()
const SDL_PixelFormat & SDL2pp::Surface::LockHandle::GetFormat |
( |
| ) |
const |
Get pixel format of the surface.
- Returns
- Format of the pixels stored in the surface
◆ GetPitch()
int SDL2pp::Surface::LockHandle::GetPitch |
( |
| ) |
const |
Get pitch of locked pixel data.
- Returns
- Number of bytes in a row of pixel data, including padding between lines
◆ GetPixels()
void * SDL2pp::Surface::LockHandle::GetPixels |
( |
| ) |
const |
Get pointer to raw pixel data of locked region.
- Returns
- Pointer to raw pixel data of locked region
◆ operator=() [1/2]
Deleted assignment operator.
This class is not copyable
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
- Returns
- Reference to self
The documentation for this class was generated from the following files: