Smart Matrix
Screen Class Referenceabstract

The interface for led matrix and eventual other led screens. More...

#include <Screen.hpp>

Inheritance diagram for Screen:
matrix

Public Member Functions

 Screen (int w, int h)
 Specify the width and height of the screen. More...
 
virtual void drawPixel (int, int, uint8_t, uint8_t, uint8_t)=0
 Draw a given pixel with a color R G B. More...
 
virtual void drawPixel (int, int, uint32_t)=0
 Draw a pixel with a hexadecimale color. More...
 
virtual void fillScreen (uint8_t, uint8_t, uint8_t)
 Fill the entire screen with r g b colors.
 
virtual void fillScreen (uint32_t)
 Fill the entire screen with a hexa or decimal color.
 
virtual void clear ()=0
 Clear the entire screen.
 
virtual void start ()
 Start the auto update of the screen.
 
virtual void stop ()
 Stop the auto update of the screen.
 
virtual void swap_buffer (bool copy)
 Swap the back buffer with front buffer. More...
 
virtual void update ()
 
int getWidth ()
 
int getHeight ()
 Return the height of the screen in pixel.
 

Protected Attributes

int width
 width and height of the screen.
 
int height
 

Detailed Description

The interface for led matrix and eventual other led screens.

This class abstracts the interface to a led screens. You cannot define this class as an object. This class should be derieved by any class that implements a led screen.

Constructor & Destructor Documentation

Screen::Screen ( int  w,
int  h 
)
inline

Specify the width and height of the screen.

Width and height are in pixel.

Member Function Documentation

virtual void Screen::drawPixel ( int  ,
int  ,
uint8_t  ,
uint8_t  ,
uint8_t   
)
pure virtual

Draw a given pixel with a color R G B.

the first int argument is the width position and the second is the height position of a pixel. rgb color is between 0 and 255.

Implemented in matrix.

virtual void Screen::drawPixel ( int  ,
int  ,
uint32_t   
)
pure virtual

Draw a pixel with a hexadecimale color.

the first int argument is the width position and the second is the height position of a pixel. color is rgb is hexa or decimale.

Implemented in matrix.

virtual void Screen::swap_buffer ( bool  copy)
inlinevirtual

Swap the back buffer with front buffer.

You can also copy the values of new buffer to the old buffer by passing a true bool to the function.

Reimplemented in matrix.


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