SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
SDL::SurfaceLock Class Reference

Locks a Surface for access to its pixels. More...

Public Member Functions

 SurfaceLock (const SurfaceLock &other)=delete
 Copy ctor.
 
 SurfaceLock (SurfaceLock &&other)
 Move ctor.
 
 ~SurfaceLock ()
 destructor
 
SurfaceLockoperator= (SurfaceLock other)
 Assignment operator.
 
constexpr operator bool () const
 Returns true if lock is active.
 
void Unlock ()
 Release the locked surface after directly accessing the pixels.
 
void * GetPixels () const
 Get the pixels.
 
int GetPitch () const
 Get pitch (the number of bytes between the start of one row the next)
 
PixelFormat GetFormat () const
 Get the pixel format.
 

Friends

class SurfaceBase
 

Detailed Description

Only really necessary if Surface.MustLock() returns t

Constructor & Destructor Documentation

◆ ~SurfaceLock()

SDL::SurfaceLock::~SurfaceLock ( )
inline
See also
Unlock()

Member Function Documentation

◆ Unlock()

void SDL::SurfaceLock::Unlock ( )
inline
Since
This function is available since SDL 3.2.0.
See also
Surface.Lock()

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