clan::PixelBufferLock< Type > Class Template Reference - ClanLib SDK
Description: clan::PixelBufferLock< Type > Class Template Reference

Public Member Functions | List of all members
clan::PixelBufferLock< Type > Class Template Reference
clanDisplay Display

PixelBuffer locking helper. More...

`#include <pixel_buffer_lock.h>`

## Public Member Functions
| PixelBufferLock (GraphicContext &gc, PixelBuffer &pixel_buffer, BufferAccess access, bool lock_pixelbuffer=true)
| Constructs a gpu pixel buffer lock.
| PixelBufferLock (PixelBuffer &pixel_buffer, bool lock_pixelbuffer=true)
| Constructs a system pixel buffer lock.
| ~PixelBufferLock ()
Type * | get_data ()
int | get_height () const
int | get_lock_count () const
| Returns the amounts of recursive pixel_buffer locks performed by this section.
int | get_pitch () const
Type & | get_pixel (int x, int y)
Type * | get_row (int y)
int | get_width () const
void | lock ()
| Lock the system pixel_buffer.
void | lock (GraphicContext &gc, BufferAccess access)
| Lock the gpu pixel_buffer.
void | unlock ()
| Unlock pixel_buffer.

## Detailed Description

template<typename Type>
class clan::PixelBufferLock< Type >

PixelBuffer locking helper.

## Constructor & Destructor Documentation

## ◆ PixelBufferLock() [1/2]

template<typename Type>

clan::PixelBufferLock< Type >::PixelBufferLock | ( | GraphicContext & | gc,
|  | PixelBuffer & | pixel_buffer,
|  | BufferAccess | access,
|  | bool | lock_pixelbuffer = true )
| inline

Constructs a gpu pixel buffer lock.

## ◆ PixelBufferLock() [2/2]

template<typename Type>

clan::PixelBufferLock< Type >::PixelBufferLock | ( | PixelBuffer & | pixel_buffer,
|  | bool | lock_pixelbuffer = true )
| inline

Constructs a system pixel buffer lock.

## ◆ ~PixelBufferLock()

template<typename Type>

clan::PixelBufferLock< Type >::~PixelBufferLock | ( |  | ) |
| inline

## Member Function Documentation

## ◆ get_data()

template<typename Type>

Type * clan::PixelBufferLock< Type >::get_data | ( |  | ) |
| inline

## ◆ get_height()

template<typename Type>

int clan::PixelBufferLock< Type >::get_height | ( |  | ) | const
| inline

## ◆ get_lock_count()

template<typename Type>

int clan::PixelBufferLock< Type >::get_lock_count | ( |  | ) | const
| inline

Returns the amounts of recursive pixel_buffer locks performed by this section.

## ◆ get_pitch()

template<typename Type>

int clan::PixelBufferLock< Type >::get_pitch | ( |  | ) | const
| inline

## ◆ get_pixel()

template<typename Type>

Type & clan::PixelBufferLock< Type >::get_pixel | ( | int | x,
|  | int | y )
| inline

## ◆ get_row()

template<typename Type>

Type * clan::PixelBufferLock< Type >::get_row | ( | int | y | ) |
| inline

## ◆ get_width()

template<typename Type>

int clan::PixelBufferLock< Type >::get_width | ( |  | ) | const
| inline

## ◆ lock() [1/2]

template<typename Type>

void clan::PixelBufferLock< Type >::lock | ( |  | ) |
| inline

Lock the system pixel_buffer.

Referenced by clan::PixelBufferLock< unsigned char >::PixelBufferLock(), and clan::PixelBufferLock< unsigned char >::PixelBufferLock().

## ◆ lock() [2/2]

template<typename Type>

void clan::PixelBufferLock< Type >::lock | ( | GraphicContext & | gc,
|  | BufferAccess | access )
| inline

Lock the gpu pixel_buffer.

## ◆ unlock()

template<typename Type>

void clan::PixelBufferLock< Type >::unlock | ( |  | ) |
| inline

Unlock pixel_buffer.

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

- pixel_buffer_lock.h