Rpi-hw  0.7.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
rpihw::image::bitmap< T > Class Template Reference

Bitmap image. More...

#include <bitmap.hpp>

+ Inheritance diagram for rpihw::image::bitmap< T >:

Public Member Functions

 bitmap (uint16_t width, uint16_t height, uint8_t channels)
 Constructor method. More...
 
virtual ~bitmap ()
 Destructor method.
 
virtual uint16_t getWidth () const
 Returns the width of the image.
 
virtual uint16_t getHeight () const
 Returns the height of the image.
 
virtual uint8_t getSpectrum () const
 Returns the number of image channels.
 
void setData (uint16_t x, uint16_t y, T *color)
 Sets the color of a pixel. More...
 
void setData (uint16_t x, uint16_t y, uint8_t c, T value)
 Sets the channel value of a pixel. More...
 
virtual color_iterator< T > getData (uint16_t x, uint16_t y) const
 Returns the color of a pixel. More...
 
virtual T getData (uint16_t x, uint16_t y, uint8_t c) const
 Returns the channel value of a pixel. More...
 

Protected Attributes

uint8_t m_channels
 Number of color channel.
 
std::vector< T > m_buffer
 The data buffer.
 
uint32_t m_width
 Size of the bitmap.
 
uint32_t m_height
 

Detailed Description

template<typename T>
class rpihw::image::bitmap< T >

Bitmap image.

Examples:
display/pcd8544.cpp.

Definition at line 64 of file bitmap.hpp.

Constructor & Destructor Documentation

template<typename T >
rpihw::image::bitmap< T >::bitmap ( uint16_t  width,
uint16_t  height,
uint8_t  channels 
)

Constructor method.

Parameters
[in]widthThe width of the image.
[in]heightThe height of the image.
[in]channelsNumber of color channel.

Definition at line 30 of file bitmap-inl.hpp.

Member Function Documentation

template<typename T >
color_iterator< T > rpihw::image::bitmap< T >::getData ( uint16_t  x,
uint16_t  y 
) const
inlinevirtual

Returns the color of a pixel.

Parameters
[in]xThe horizontal position of the pixel.
[in]yThe vertical position of the pixel.
Returns
An iterator to the color data.

Implements rpihw::image::base< T >.

Definition at line 214 of file bitmap-inl.hpp.

template<typename T >
T rpihw::image::bitmap< T >::getData ( uint16_t  x,
uint16_t  y,
uint8_t  c 
) const
inlinevirtual

Returns the channel value of a pixel.

Parameters
[in]xThe horizontal position of the pixel.
[in]yThe vertical position of the pixel.
[in]cThe color channel.
Returns
The channel value of the pixel.

Implements rpihw::image::base< T >.

Definition at line 222 of file bitmap-inl.hpp.

template<typename T >
void rpihw::image::bitmap< T >::setData ( uint16_t  x,
uint16_t  y,
T *  color 
)
inline

Sets the color of a pixel.

Parameters
[in]xThe horizontal position of the pixel.
[in]yThe vertical position of the pixel.
[in]colorA pointer to the color data.

Definition at line 198 of file bitmap-inl.hpp.

template<typename T >
void rpihw::image::bitmap< T >::setData ( uint16_t  x,
uint16_t  y,
uint8_t  c,
value 
)
inline

Sets the channel value of a pixel.

Parameters
[in]xThe horizontal position of the pixel.
[in]yThe vertical position of the pixel.
[in]cThe color channel.
[in]valueThe channel value of the pixel.

Definition at line 206 of file bitmap-inl.hpp.


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