libpng++  v0.2.5-1
C++ library for PNG images
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
png::packed_pixel_row< pixel > Class Template Reference

The packed pixel row class template. More...

#include <pixel_buffer.hpp>

Collaboration diagram for png::packed_pixel_row< pixel >:

Public Types

typedef
detail::const_packed_pixel_proxy
< pixel > 
const_pixel_proxy
 The immutable packed pixel proxy type. More...
 
typedef
detail::packed_pixel_proxy
< pixel > 
pixel_proxy
 The mutable packed pixel proxy type. More...
 

Public Member Functions

 packed_pixel_row (size_t size=0)
 Constructs a pixel row object for size packed pixels. More...
 
const_pixel_proxy at (size_t index) const
 Returns an immutable proxy the to the pixel at index. More...
 
pixel_proxy at (size_t index)
 Returns a mutable proxy the to the pixel at index. More...
 
byteget_data ()
 Returns the starting address of the row. More...
 
const_pixel_proxy operator[] (size_t index) const
 Returns an immutable proxy the to the pixel at index. More...
 
pixel_proxy operator[] (size_t index)
 Returns n mutable proxy the to the pixel at index. More...
 
void resize (size_t size)
 Resizes the pixel row to hold up to size packed pixels. More...
 
size_t size () const
 

Static Private Member Functions

static size_t get_pixels_per_byte ()
 

Private Attributes

size_t m_size
 
std::vector< bytem_vec
 

Detailed Description

template<class pixel>
class png::packed_pixel_row< pixel >

The packed pixel row class template.

Stores the pixel row as a std::vector of byte-s, providing access to individual packed pixels via proxy objects.

Member Typedef Documentation

template<class pixel>
typedef detail::const_packed_pixel_proxy< pixel > png::packed_pixel_row< pixel >::const_pixel_proxy

The immutable packed pixel proxy type.

template<class pixel>
typedef detail::packed_pixel_proxy< pixel > png::packed_pixel_row< pixel >::pixel_proxy

The mutable packed pixel proxy type.

Constructor & Destructor Documentation

template<class pixel>
png::packed_pixel_row< pixel >::packed_pixel_row ( size_t  size = 0)
inlineexplicit

Constructs a pixel row object for size packed pixels.

References png::packed_pixel_row< pixel >::resize(), and png::packed_pixel_row< pixel >::size().

Here is the call graph for this function:

Member Function Documentation

template<class pixel>
const_pixel_proxy png::packed_pixel_row< pixel >::at ( size_t  index) const
inline

Returns an immutable proxy the to the pixel at index.

References png::packed_pixel_row< pixel >::get_pixels_per_byte(), and png::packed_pixel_row< pixel >::m_vec.

Here is the call graph for this function:

template<class pixel>
pixel_proxy png::packed_pixel_row< pixel >::at ( size_t  index)
inline

Returns a mutable proxy the to the pixel at index.

References png::packed_pixel_row< pixel >::get_pixels_per_byte(), and png::packed_pixel_row< pixel >::m_vec.

Here is the call graph for this function:

template<class pixel>
byte* png::packed_pixel_row< pixel >::get_data ( )
inline

Returns the starting address of the row.

References png::packed_pixel_row< pixel >::m_vec.

Referenced by png::row_traits< packed_pixel_row< pixel > >::get_data().

Here is the caller graph for this function:

template<class pixel>
static size_t png::packed_pixel_row< pixel >::get_pixels_per_byte ( )
inlinestaticprivate
template<class pixel>
const_pixel_proxy png::packed_pixel_row< pixel >::operator[] ( size_t  index) const
inline

Returns an immutable proxy the to the pixel at index.

The non-checking version.

References png::packed_pixel_row< pixel >::get_pixels_per_byte(), and png::packed_pixel_row< pixel >::m_vec.

Here is the call graph for this function:

template<class pixel>
pixel_proxy png::packed_pixel_row< pixel >::operator[] ( size_t  index)
inline

Returns n mutable proxy the to the pixel at index.

The non-checking version.

References png::packed_pixel_row< pixel >::get_pixels_per_byte(), and png::packed_pixel_row< pixel >::m_vec.

Here is the call graph for this function:

template<class pixel>
void png::packed_pixel_row< pixel >::resize ( size_t  size)
inline

Resizes the pixel row to hold up to size packed pixels.

References png::packed_pixel_row< pixel >::get_pixels_per_byte(), png::packed_pixel_row< pixel >::m_size, png::packed_pixel_row< pixel >::m_vec, and png::packed_pixel_row< pixel >::size().

Referenced by png::packed_pixel_row< pixel >::packed_pixel_row().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

template<class pixel>
size_t png::packed_pixel_row< pixel >::m_size
private

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