Omnidome
Fulldome Mapping Software Toolkit
|
A buffer holds an w x h pixel array. More...
#include <Buffer.h>
Public Types | |
typedef T | pixel_type |
Our pixel type. More... | |
typedef std::vector< pixel_type > | data_type |
Our data type (a dynamic array) More... | |
Public Member Functions | |
Buffer () | |
Standard constructor. More... | |
Buffer (int _width, int _height) | |
Constructor with automatic resize. More... | |
void | put (int _x, int _y, const pixel_type &_pixel) |
Write pixel value to position (x,y) More... | |
void | put (size_t _offset, const pixel_type &_pixel) |
Write pixel value to offset (= x * width + y) More... | |
pixel_type & | operator() (int _x, int _y) |
Return pixel on position (x,y) More... | |
pixel_type const & | operator() (int _x, int _y) const |
Return pixel on position (x,y) (const version) More... | |
pixel_type & | operator() (size_t _offset) |
Return pixel on offset (= x * width + y) More... | |
pixel_type const & | operator() (size_t _offset) const |
Return pixel on offset (= x * width + y) (const version) More... | |
pixel_type & | operator[] (size_t _offset) |
Subscript operator for accessing elements by index. More... | |
pixel_type const & | operator[] (size_t _offset) const |
Subscript operator for accessing elements by index (const version) More... | |
pixel_type & | pixel (int _x, int _y) |
Return pixel on position (x,y) More... | |
Buffer | cropRect (QRect const &_rect) const |
pixel_type const & | pixel (int _x, int _y) const |
Return pixel on position (x,y) (const version) More... | |
pixel_type & | pixel (size_t _offset) |
Return pixel on offset (= x * width + y) More... | |
pixel_type const & | pixel (size_t _offset) const |
Return pixel on offset (= x * width + y) (const version) More... | |
int | width () const |
Return width of the buffer. More... | |
int | height () const |
Return height of the buffer. More... | |
data_type const & | data () const |
Return const reference to data. More... | |
void | clear () |
Clear buffer with black color. More... | |
void | clear (const pixel_type &_pixel) |
Clear buffer with specific pixel. More... | |
bool | empty () const |
Returns true if width and height are zero. More... | |
size_t | size () const |
Returns size of buffer (= width * height) More... | |
void | resize (int _width, int _height) |
Resize buffer to given width and height. More... | |
QImage | toQImage () const |
Convert buffer to QImage. More... | |
void * | ptr () |
Return void pointer to data. More... | |
void const * | ptr () const |
Return void pointer to data (const version) More... | |
void | toStream (QDataStream &_os) const |
Write blend mask to stream. More... | |
void | fromStream (QDataStream &_is) |
Read blend mask from stream. More... | |
Private Attributes | |
int | width_ |
int | height_ |
data_type | data_ |
Friends | |
bool | operator== (Buffer const &_lhs, Buffer const &_rhs) |
Test for equality, buffer is ignored. More... | |
A buffer holds an w x h pixel array.
typedef std::vector<pixel_type> omni::Buffer< T >::data_type |
Our data type (a dynamic array)
typedef T omni::Buffer< T >::pixel_type |
Our pixel type.
|
inline |
Standard constructor.
|
inline |
Constructor with automatic resize.
|
inline |
Clear buffer with black color.
|
inline |
Clear buffer with specific pixel.
|
inline |
|
inline |
Return const reference to data.
|
inline |
Returns true if width and height are zero.
|
inline |
Read blend mask from stream.
|
inline |
Return height of the buffer.
|
inline |
Return pixel on position (x,y)
|
inline |
Return pixel on position (x,y) (const version)
|
inline |
Return pixel on offset (= x * width + y)
|
inline |
Return pixel on offset (= x * width + y) (const version)
|
inline |
Subscript operator for accessing elements by index.
|
inline |
Subscript operator for accessing elements by index (const version)
|
inline |
Return pixel on position (x,y)
|
inline |
Return pixel on position (x,y) (const version)
|
inline |
Return pixel on offset (= x * width + y)
|
inline |
Return pixel on offset (= x * width + y) (const version)
|
inline |
Return void pointer to data.
|
inline |
Return void pointer to data (const version)
|
inline |
Write pixel value to position (x,y)
|
inline |
Write pixel value to offset (= x * width + y)
|
inline |
Resize buffer to given width and height.
|
inline |
Returns size of buffer (= width * height)
|
inline |
Convert buffer to QImage.
|
inline |
Write blend mask to stream.
|
inline |
Return width of the buffer.
Test for equality, buffer is ignored.
|
private |
|
private |
|
private |