ImageBufferTemplate< BASECLASS > Struct Template Reference

#include <gfx_image_pixelformat.h>

Detailed Description

template<typename BASECLASS>
struct maxon::ImageBufferTemplate< BASECLASS >

Several functions use this helper structure to pass the image data to functions.

Public Member Functions

 ImageBufferTemplate (const ImageBufferTemplate &src)
 
 ImageBufferTemplate (typename BASECLASS::PIXELTYPE *buffer, const PixelFormat &format)
 
 ImageBufferTemplate (typename BASECLASS::PIXELTYPE *buffer, BITS inc, const ChannelOffsets &channelOffsets, const PixelFormat &format)
 
 ImageBufferTemplate (const BASECLASS &buffer, const ChannelOffsets &channelOffsets, const PixelFormat &format)
 
ImageBufferTemplateoperator= (const ImageBufferTemplate &src)
 
const ImageConstBufferToConst () const
 

Public Attributes

const ChannelOffsets_channelOffsets
 
PixelFormat _format
 

Constructor & Destructor Documentation

◆ ImageBufferTemplate() [1/4]

ImageBufferTemplate ( const ImageBufferTemplate< BASECLASS > &  src)

Copy constructor.

◆ ImageBufferTemplate() [2/4]

ImageBufferTemplate ( typename BASECLASS::PIXELTYPE *  buffer,
const PixelFormat &  format 
)

Constructs the ImageBuffer object. The channelOffsets and increment is automatically taken from the pixelformat.

◆ ImageBufferTemplate() [3/4]

ImageBufferTemplate ( typename BASECLASS::PIXELTYPE *  buffer,
BITS  inc,
const ChannelOffsets channelOffsets,
const PixelFormat &  format 
)

Constructs the helper object.

Parameters
[in]bufferPointer to the memory block of the pixel data.
[in]incDistance in number of bytes from one pixel to the next. For packed pixels this value is equal to BytesPerPixel().
[in]channelOffsetsDistance of the channels of a pixel. This can be used to work with planes. For packed pixels this value is equal to BytesPerChannel().
[in]formatPixel format of the buffer.

◆ ImageBufferTemplate() [4/4]

ImageBufferTemplate ( const BASECLASS &  buffer,
const ChannelOffsets channelOffsets,
const PixelFormat &  format 
)

Constructs the helper object.

Parameters
[in]bufferPixelConst/MutableBuffer that points to the pixel memory/offset.
[in]channelOffsetsDistance of the channels of a pixel. This can be used to work with planes. For packed pixels this value is equal to BytesPerChannel().
[in]formatPixel format of the buffer.

Member Function Documentation

◆ operator=()

ImageBufferTemplate& operator= ( const ImageBufferTemplate< BASECLASS > &  src)

◆ ToConst()

const ImageConstBuffer& ToConst ( ) const

Member Data Documentation

◆ _channelOffsets

const ChannelOffsets& _channelOffsets

◆ _format

PixelFormat _format