COSA
An Object-Oriented Platform for Arduino Programming
Canvas::Image Class Referenceabstract

#include <Canvas.hh>

Collaboration diagram for Canvas::Image:
Collaboration graph

Public Member Functions

 Image (uint16_t width=0, uint16_t height=0)
 
virtual bool read (color16_t *buf, size_t count)=0
 

Public Attributes

uint16_t WIDTH
 
uint16_t HEIGHT
 

Static Public Attributes

static const size_t BUFFER_MAX = 32
 

Detailed Description

Canvas image abstract class. Allow implementation of pixel streams with scanning order from left to right, top to bottom. May be used from pixel grids, shadings and pictures from file.

Definition at line 334 of file Canvas.hh.

Constructor & Destructor Documentation

Canvas::Image::Image ( uint16_t  width = 0,
uint16_t  height = 0 
)
inline

Construct canvas image with given width and height.

Parameters
[in]width.
[in]height.

Definition at line 347 of file Canvas.hh.

Member Function Documentation

virtual bool Canvas::Image::read ( color16_t buf,
size_t  count 
)
pure virtual

Read the given number of pixel into the given buffer. Return true(1) if successful otherwise false(0).

Parameters
[in]bufpixel buffer pointer.
[in]countnumber of pixels to read.
Returns
bool.

Member Data Documentation

const size_t Canvas::Image::BUFFER_MAX = 32
static

Buffer size.

Definition at line 363 of file Canvas.hh.

uint16_t Canvas::Image::HEIGHT

Canvas image height.

Definition at line 340 of file Canvas.hh.

uint16_t Canvas::Image::WIDTH

Canvas image width.

Definition at line 337 of file Canvas.hh.


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