png++
0.2.9
|
The basic class template to represent image pixel data. More...
#include <pixel_buffer.hpp>
Public Types | |
typedef row | row_type |
A row of pixel data. More... | |
typedef row_type & | row_access |
typedef row_type const & | row_const_access |
typedef traits | row_traits |
Public Member Functions | |
basic_pixel_buffer () | |
Constructs an empty 0x0 pixel buffer object. More... | |
basic_pixel_buffer (uint_32 width, uint_32 height) | |
Constructs an empty pixel buffer object. More... | |
uint_32 | get_width () const |
uint_32 | get_height () const |
void | resize (uint_32 width, uint_32 height) |
Resizes the pixel buffer. More... | |
row_access | get_row (size_t index) |
Returns a reference to the row of image data at specified index. More... | |
row_const_access | get_row (size_t index) const |
Returns a const reference to the row of image data at specified index. More... | |
row_access | operator[] (size_t index) |
The non-checking version of get_row() method. More... | |
row_const_access | operator[] (size_t index) const |
The non-checking version of get_row() method. More... | |
void | put_row (size_t index, row_type const &r) |
Replaces the row at specified index. More... | |
pixel | get_pixel (size_t x, size_t y) const |
Returns a pixel at (x,y) position. More... | |
void | set_pixel (size_t x, size_t y, pixel p) |
Replaces a pixel at (x,y) position. More... | |
Protected Types | |
typedef std::vector< row_type > | row_vec |
Protected Attributes | |
uint_32 | m_width |
uint_32 | m_height |
row_vec | m_rows |
The basic class template to represent image pixel data.
typedef row png::basic_pixel_buffer< pixel, row, traits >::row_type |
A row of pixel data.
typedef row_type& png::basic_pixel_buffer< pixel, row, traits >::row_access |
typedef row_type const& png::basic_pixel_buffer< pixel, row, traits >::row_const_access |
typedef traits png::basic_pixel_buffer< pixel, row, traits >::row_traits |
|
protected |
|
inline |
Constructs an empty 0x0 pixel buffer object.
|
inline |
Constructs an empty pixel buffer object.
|
inline |
|
inline |
|
inline |
Resizes the pixel buffer.
If new width or height is greater than the original, expanded pixels are filled with value of pixel().
Referenced by png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::basic_pixel_buffer(), and png::packed_pixel_row< pixel >::packed_pixel_row().
|
inline |
Returns a reference to the row of image data at specified index.
Checks the index before returning a row: an instance of std::out_of_range is thrown if index
is greater than height
.
Referenced by png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::get_pixel(), and png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::set_pixel().
|
inline |
Returns a const reference to the row of image data at specified index.
The checking version.
|
inline |
The non-checking version of get_row() method.
|
inline |
The non-checking version of get_row() method.
|
inline |
Replaces the row at specified index.
|
inline |
Returns a pixel at (x,y) position.
|
inline |
Replaces a pixel at (x,y) position.
|
protected |
Referenced by png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::get_width(), png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::put_row(), and png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::resize().
|
protected |
|
protected |
Referenced by png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::get_row(), png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::operator[](), png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::put_row(), and png::basic_pixel_buffer< packed_index_pixel< bits >, packed_pixel_row< packed_index_pixel< bits > > >::resize().